BlogReference / Course Lesson

=WITHIN_RADIUS(): Find addresses within a radius in Google Sheets

6 July 2026·8 min read

To find addresses within a radius in Google Sheets, use the =WITHIN_RADIUS() custom function from the InstaMaps add-on. You provide a target coordinate, an array of candidate coordinates, and a distance in metres. The function returns a boolean array indicating which locations fall inside your specified circular boundary.

This is for real estate agents running circle prospecting farms, logistics managers filtering depot proximity, and sales teams building territory maps. The end state is a cleanly filtered sheet and an automatically generated live map URL showing only the properties or stops that meet your distance criteria.

TL;DR
  • =WITHIN_RADIUS() checks if a target location falls inside a specified distance from a centre point, returning TRUE or FALSE.
  • Use this as a primitive for circle prospecting, territory mapping, and filtering large lead lists by proximity.
  • Requires a centre point (lat/lng) and a target location (lat/lng or address) to calculate the straight-line distance.
  • Combine with Google Sheets' native =FILTER() function to extract only the rows that fall inside your radius.
  • The free tier allows 100 lookups per day (1,000/day with a free email unlock) before returning a quota message.
  • Access the formula via the sidebar (Extensions > InstaMaps > Enable formulas) to insert it without typing.

Syntax and arguments

The =WITHIN_RADIUS() function evaluates whether a target location falls inside a specified distance from a centre point. It returns a boolean value (TRUE or FALSE), making it the primary primitive for circle prospecting in your spreadsheets.

Because the mathematical calculation requires coordinates rather than text strings, you must pass latitude and longitude pairs to the function. If you only have physical addresses, convert them first using our [google-sheets-geocode-formula].

Syntax: =WITHIN_RADIUS(centre, target, radius, [unit])

  1. centre (Required): The reference point. Accepts a comma-separated string ("40.7128,-74.0060"), a two-column range (A2:B2), or a single cell containing a coordinate pair.

  2. target (Required): The location you are testing. Must use the same data format as the centre argument.

  3. radius (Required): The distance measurement. Accepts a hard-coded number (5) or a cell reference (D$1).

  4. [unit] (Optional): The measurement system. Use "mi" for miles or "km" for kilometres. Defaults to miles ("mi") if left blank.

Common errors

When a formula fails, Google Sheets returns a specific error code based on the failure point. Here are the specific errors associated with =WITHIN_RADIUS() and how to resolve them.

  1. #NAME? Error: If your cell displays #NAME?, Google Sheets does not recognise the function. This happens because the InstaMaps add-on is missing or disabled for the current document. Install the free add-on from the Google Workspace Marketplace, or navigate to Extensions > InstaMaps > Enable formulas to activate it.

  2. #VALUE! Error: This occurs when the function receives text instead of coordinates. If you pass "123 Main St" into the centre or target arguments, the math fails. Ensure you are referencing cells containing parsed latitude and longitude pairs.

Worked examples: Filtering a 200-home farm

The =WITHIN_RADIUS() function acts as a boolean filter, returning TRUE or FALSE based on a defined circular boundary. It replaces the need to manually calculate distances and manually sort data. Here is how three different professionals use the function to filter location data in Google Sheets.

**Scenario 1: Real estate circle prospecting** An agent manages a 200-home geographic farm in a specific postcode. They just closed a sale at 45 Oak Lane and want to identify all homes within a strict 2-mile radius of that property to send just-sold mailers. The sheet contains physical addresses in A2:A201. Before calculating the radius, the agent geocodes the addresses into coordinate pairs using =GEOCODE(A2:A201) in column B (B2:B201). The coordinate for the recently sold property is stored in cell D1, and the radius value (2) is stored in D2. In cell C2, the agent writes: =ARRAYFORMULA(WITHIN_RADIUS($D$1, B2:B201, $D$2, "mi")) This evaluates all 200 rows simultaneously. Column C now displays TRUE for properties inside the circle and FALSE for those outside. To generate a clean mailing list of only the properties inside the radius, the agent uses a native Google Sheets function in cell E2: =FILTER(A2:A201, C2:C201=TRUE)

**Scenario 2: Sales territory hotspotting** A regional sales manager is preparing for a major conference at the Central Convention Centre. They have a CRM export of 850 warm leads spanning rows 2 through 851. The manager wants to find every lead located within a 15-kilometre radius of the venue to schedule impromptu site visits. The CRM export provides addresses in column A, which the manager geocodes into column B (B2:B851). The precise coordinate of the convention centre is placed in G1. To evaluate the distance individually, the manager places this formula in C2: =WITHIN_RADIUS($G$1, B2, 15, "km") They drag the fill handle down to C851. The sheet flags the 142 leads that fall inside the 15-kilometre boundary. To pivot from a true/false output to an actionable distance metric, the manager could add a nested IF statement: =IF(WITHIN_RADIUS($G$1, B2, 15, "km")=TRUE, "Inside Territory", "Outside")

**Scenario 3: Event venue proximity checking** An event planner is vetting 47 potential dinner venues for a corporate retreat. The core requirement is that the venue must be within a 0.5-mile radius of the main hotel. The venue names are listed in A2:A48, and their geocoded coordinates are in B2:B48. The hotel's coordinate is placed in E1. The planner applies the formula in C2: =ARRAYFORMULA(WITHIN_RADIUS(E$1, B2:B48, 0.5, "mi")) Because the radius is set to a fraction of a mile, the function accurately filters out venues that are technically walkable but exceed the strict 0.5-mile parameter. The planner can immediately eliminate the 31 venues returning FALSE.

Composes with

The true utility of =WITHIN_RADIUS() emerges when you chain it with other InstaMaps custom functions and native Google Sheets operations. Because it outputs a clean boolean value, it acts as a reliable gatekeeper for more complex workflows. Instead of running every address through heavy mapping operations, you first use =WITHIN_RADIUS() to isolate the relevant subset of data.

**Chain 1: Geocode, Filter by Radius, and Map** If you want to visualise your radius data on a live map, you must first filter the raw data and then pass the surviving coordinates to the =INSTAMAP() function. 1. Convert your raw text addresses to coordinates using =GEOCODE(A2:A500). 2. Evaluate them against your centre point using =ARRAYFORMULA(WITHIN_RADIUS($D$1, B2:B500, 10, "mi")). 3. Filter the coordinates that returned TRUE using =FILTER(B2:B500, C2:C500=TRUE). 4. Pass that filtered array into the mapping function: =INSTAMAP(FILTER(B2:B500, C2:C500=TRUE)). This generates a live, hosted shareable map URL that updates automatically whenever you add new addresses to column A or change the radius value in cell D1.

**Chain 2: Radius Gating and Distance Sorting** In dispatch or routing scenarios, you need to identify jobs within a territory and then organise them by proximity. 1. Use =WITHIN_RADIUS() to tag potential stops as TRUE or FALSE. 2. Combine this with the =SORT_BY_DISTANCE() function. By applying the sort function only to the rows where WITHIN_RADIUS equals TRUE, you create a prioritised list of stops ordered from closest to furthest. 3. From there, you can feed the sorted coordinates into =VISIT_ORDER() to optimise the final route, or use =ROUTE_LINK() to push up to 11 stops directly into Google Maps' official URL scheme for a driver.

These workflows can be generated without typing. Open the sidebar (Extensions > InstaMaps > Enable formulas) and use the Build-the-workflow button to automatically write these formula chains based on your column headers.

Step-by-step: Using the sidebar

1. Open your spreadsheet and navigate to **Extensions > InstaMaps > Enable formulas**.

2. In the sidebar, select the **Proximity filtering** workflow option.

3. Highlight the range containing your target addresses (e.g., A2:A250).

4. Input your centre point address or latitude/longitude coordinates into the designated sidebar fields.

5. Set your radius distance in miles or kilometres, choosing the specific unit from the dropdown.

6. Click **Build-the-workflow**.

Instead of manually typing =WITHIN_RADIUS(GEOCODE(A2:A250), C1, D1, 2.5), the Build-the-workflow button writes the entire chain directly into your active cell. It automatically nests the GEOCODE function to turn your text addresses into coordinates, locks the absolute references for your centre point (like $C$1), and formats the output array. If you are processing a 500-row farm, this prevents manual syntax errors that break calculations halfway down the column. Once the formula generates your filtered dataset, you can highlight the output range and insert an =INSTAMAP() link directly from the sidebar to visualise the exact polygon or dot cluster without leaving the grid.

Limits and honest alternatives

=WITHIN_RADIUS() calculates a straight-line, crow-fly distance. It draws a perfect circle on a coordinate graph and does not account for rivers, fenced motorways, or winding mountain roads. If you need to ensure a technician can actually reach a site within a 15-minute drive, =WITHIN_RADIUS() will give you false positives. In those scenarios, use =TRAVEL_TIME() to filter by actual road network constraints.

This add-on is free, but the free tier limits you to 100 lookups per day. If you geocode a 500-property list, you will hit a quota message at row 100. Registering a free email unlock raises this limit to 1,000 lookups per day. If you routinely process lists larger than 1,000 rows, consider running your data in batches across multiple days or pre-filtering your list with standard spreadsheet logic before applying geospatial formulas.

Who this is for

This function is built for real estate agents running circle prospecting campaigns. If you just sold a property and want to pull every address within a one-mile radius from a 5,000-parcel county export to send targeted mailers, this formula filters that list in seconds.

It is also highly effective for local business outreach. If you operate a commercial cleaning company and want to identify all existing clients within a two-mile radius of a prospective lead to prove market density, =WITHIN_RADIUS() provides the exact dataset.

Finally, this function serves field service dispatchers who need a rapid, visual filter. When a storm hits and 47 emergency calls come in, dispatchers use this formula to isolate the 12 homes within a tight five-mile cluster, assign them to a specific crew, and push the optimised route to =ROUTE_LINK(). If you need pure geographical proximity to trigger an action, this is the tool.

Try it free

Map your Salesforce accounts in under 5 minutes — no admin setup.

Install Free →

Common Questions

How do I find addresses within a radius in Google Sheets?

The syntax is =WITHIN_RADIUS(target_lat, target_lng, lat_array, lng_array, radius_metres). For example, =WITHIN_RADIUS($B$2, $C$2, B3:B50, C3:C50, 8046) evaluates a target coordinate against 47 addresses. It returns TRUE if an address is inside the radius, and FALSE if it is outside. You can then filter your sheet by this column to isolate the qualifying locations.

What is the formula for distance radius in Google Sheets?

The exact formula is =WITHIN_RADIUS(), which evaluates the geographical distance between a fixed point and an array of points. A real estate agent with a 200-home farm can geocode the addresses in columns B and C. They can then run =WITHIN_RADIUS($B$2, $C$2, B3:B202, C3:C202, 1609) to find homes within a 1.6-kilometre radius of a recently sold property. This replaces complex spherical trigonometry with a single array formula.

How many addresses can I filter within a radius for free?

You can process up to 100 lookups per day on the free tier, which increases to 1,000 lookups per day with a free email unlock. Because WITHIN_RADIUS only measures distances between known coordinates rather than making new external API calls, evaluating large datasets is very fast. However, if your coordinates are not already cached in the sheet, you must first use =GEOCODE() to fetch them. For extremely large datasets exceeding 10,000 rows, consider filtering by postcode first to reduce the computational load.

Can I generate a live map of addresses inside a radius?

Yes, WITHIN_RADIUS composes perfectly with =INSTAMAP() to visualise your filtered data. First, run the radius formula to output TRUE or FALSE in a helper column, then filter your dataset to show only the TRUE rows. Finally, pass your filtered coordinates into =INSTAMAP() to generate a live, hosted shareable map URL. This map will automatically update whenever you add new addresses or change the radius limits in your sheet.

Why does my Google Sheet show a #NAME? error when using WITHIN_RADIUS?

A #NAME? error indicates Google Sheets does not recognise the function, meaning the InstaMaps add-on is not installed. You must install the free add-on from the Google Workspace Marketplace and activate it via Extensions > InstaMaps > Enable formulas. You can read more about resolving this specific issue in our google-sheets-geocode-formula guide. Alternatively, use the sidebar's Build-the-workflow button to insert formulas correctly without typing.

How does WITHIN_RADIUS differ from TRAVEL_TIME?

WITHIN_RADIUS calculates a strict geographical straight line, returning TRUE or FALSE based on a fixed metric distance. In contrast, =TRAVEL_TIME() calculates actual driving times based on road networks, returning minutes. For example, if you need to dispatch 5 crews based on actual traffic conditions rather than physical distance, use TRAVEL_TIME instead. Use WITHIN_RADIUS for simple boundary mapping and TRAVEL_TIME for realistic logistics planning.

Start circle prospecting in Google Sheets

Install the InstaMaps add-on to use =WITHIN_RADIUS() and automatically filter your spreadsheets by physical distance. Free for up to 1,000 lookups per day.

Install InstaMaps free