The short answer

A full Google Maps link often has the latitude and longitude inside it. Excel can read them out with text formulas: SEARCH finds the marker in the link, MID cuts out the number, and NUMBERVALUE turns the text into a number. The two formulas below handle the common link shapes and write "no coordinates" when a link has none.

Short links that start with maps.app.goo.gl have no coordinates in them. Open each one in a browser and copy the full address from the address bar, or read the coordinates in Google Maps itself.

What is in the link

Example piece

What it gives you

!3d...!4d...

!3d38.8976763!4d-77.0365298

The place pin. Use this when it is there.

/@lat,lng,zoom

/@40.6892494,-74.0445004,17z

The center of the map view.

query= or q=

?q=51.4778,-0.0015

The coordinates that were searched.

Short link

maps.app.goo.gl/...

Nothing. Open it in a browser first.

The formulas were tested in Excel for Microsoft 365 on Windows on December 6, 2026. The notes on Google Maps and Excel come from Google and Microsoft help pages, read the same day.

Google publishes one URL format for developers, which we cover below. Google does not document the longer links you copy from the address bar, so this section describes the links we tested.

The place pin: !3d and !4d

When a link points to a named place, the data= part at the end usually holds !3d followed by the latitude and !4d followed by the longitude. In our White House example that is !3d38.8976763!4d-77.0365298. These are the coordinates of the place itself.

The map view: @lat,lng,zoom

The part after @ is the map on screen: latitude, longitude, then the zoom level, as in @40.6892494,-74.0445004,17z. That point is the center of the view, which may or may not be the place. In our examples the @ values and the !3d and !4d values were identical. We did not test a link copied after the map was moved. When a link has both, use the place pin, as the combined formulas below do.

Search links: query= and q=

Google's Maps URLs documentation describes a search link of the form https://www.google.com/maps/search/?api=1&query=, where the query can be comma-separated latitude and longitude. The page says api=1 is required and its only valid value is 1. Older links such as https://maps.google.com/?q=51.4778,-0.0015 put the coordinates after q=.

Google's own example writes the comma as %2C: query=47.5951518%2C-122.3316393. The combined formulas below turn %2C back into a comma before they read the numbers, and this shape is in the tested examples.

Short links: maps.app.goo.gl

A short link such as https://maps.app.goo.gl/abc123XYZ holds only a code, with no latitude or longitude in the text, so no formula can read coordinates from it. Open it in a browser and look at the full address that Google Maps shows.

Excel formulas for latitude and longitude

Put the links in column A with a header in row 1, so the first link is in A2. Put these in B2 and C2 and fill them down.

One formula for all link types

Latitude (B2):

=IFERROR(NUMBERVALUE(MID(A2,SEARCH("!3d",A2)+3,SEARCH("!4d",A2)-SEARCH("!3d",A2)-3),"."),IFERROR(NUMBERVALUE(MID(A2,SEARCH("@",A2)+1,SEARCH(",",A2,SEARCH("@",A2))-SEARCH("@",A2)-1),"."),IFERROR(NUMBERVALUE(MID(SUBSTITUTE(SUBSTITUTE(A2,"%2C",","),"query=","q="),SEARCH("q=",SUBSTITUTE(SUBSTITUTE(A2,"%2C",","),"query=","q="))+2,SEARCH(",",SUBSTITUTE(SUBSTITUTE(A2,"%2C",","),"query=","q="),SEARCH("q=",SUBSTITUTE(SUBSTITUTE(A2,"%2C",","),"query=","q=")))-SEARCH("q=",SUBSTITUTE(SUBSTITUTE(A2,"%2C",","),"query=","q="))-2),"."),"no coordinates")))

Longitude (C2):

=IFERROR(NUMBERVALUE(LEFT(MID(A2,SEARCH("!4d",A2)+3,20),IFERROR(SEARCH("!",MID(SUBSTITUTE(A2,"?","!"),SEARCH("!4d",A2)+3,20))-1,20)),"."),IFERROR(NUMBERVALUE(MID(A2,SEARCH(",",A2,SEARCH("@",A2))+1,SEARCH(",",A2,SEARCH(",",A2,SEARCH("@",A2))+1)-SEARCH(",",A2,SEARCH("@",A2))-1),"."),IFERROR(NUMBERVALUE(LEFT(MID(SUBSTITUTE(SUBSTITUTE(A2,"%2C",","),"query=","q="),SEARCH(",",SUBSTITUTE(SUBSTITUTE(A2,"%2C",","),"query=","q="),SEARCH("q=",SUBSTITUTE(SUBSTITUTE(A2,"%2C",","),"query=","q=")))+1,20),IFERROR(SEARCH("&",MID(SUBSTITUTE(SUBSTITUTE(A2,"%2C",","),"query=","q="),SEARCH(",",SUBSTITUTE(SUBSTITUTE(A2,"%2C",","),"query=","q="),SEARCH("q=",SUBSTITUTE(SUBSTITUTE(A2,"%2C",","),"query=","q=")))+1,20))-1,20)),"."),"no coordinates")))

Each formula tries the place pin first, then the map center after @, then q= or query=. If all three fail, it returns the text "no coordinates". The results are numbers, so you can sort and round them.

Formulas for one link type

If all your links have the same shape, the shorter formulas are easier to check.

Place pin latitude, for links with !3d...!4d...:

=NUMBERVALUE(MID(A2,SEARCH("!3d",A2)+3,SEARCH("!4d",A2)-SEARCH("!3d",A2)-3),".")

Place pin longitude:

=NUMBERVALUE(LEFT(MID(A2,SEARCH("!4d",A2)+3,20),IFERROR(SEARCH("!",MID(SUBSTITUTE(A2,"?","!"),SEARCH("!4d",A2)+3,20))-1,20)),".")

Map center latitude, for links with /@lat,lng,zoom:

=NUMBERVALUE(MID(A2,SEARCH("@",A2)+1,SEARCH(",",A2,SEARCH("@",A2))-SEARCH("@",A2)-1),".")

Map center longitude:

=NUMBERVALUE(MID(A2,SEARCH(",",A2,SEARCH("@",A2))+1,SEARCH(",",A2,SEARCH(",",A2,SEARCH("@",A2))+1)-SEARCH(",",A2,SEARCH("@",A2))-1),".")

These return #VALUE! when the marker is missing from a link, because Microsoft's SEARCH page says the function returns that error when the text is not found.

How the formulas work

  • SEARCH returns the position of a marker such as !3d, @ or a comma. It is not case sensitive. Its optional third argument sets where to start, which is how the formulas find the first comma after @.

  • MID cuts the text between two positions. For the longitude after !4d, the formula takes 20 characters and stops at the next ! or ? if there is one.

  • SUBSTITUTE turns query= into q=, so one branch handles both kinds of search link. It also turns %2C into a comma.

  • NUMBERVALUE turns the text into a number with a period as the decimal separator. Microsoft's NUMBERVALUE page describes it as converting text to a number "in a locale-independent way". The formulas pass "." as the decimal separator, which is meant to keep the result the same whatever the decimal setting of the computer.

  • IFERROR returns a value you choose when a formula gives an error, according to Microsoft's IFERROR page. Here it moves on to the next link shape, and at the end writes "no coordinates".

Tested examples

These links were typed to match the shapes of real Google Maps links. With each link in A2, the combined formulas returned:

Link

Latitude

Longitude

https://www.google.com/maps/place/The+White+House/@38.8976763,-77.0365298,17z/data=!3m1!4b1!4m6!3m5!1s0x89b7b7bcdecbb1df:0x715969d86d0b76bf!8m2!3d38.8976763!4d-77.0365298!16zL20vMDgxc3E?entry=ttu

38.8976763

-77.0365298

https://www.google.com/maps/@40.6892494,-74.0445004,17z

40.6892494

-74.0445004

https://www.google.com/maps/place/Sydney+Opera+House/@-33.8567844,151.2152967,17z/data=!3m1!4b1!4m6!3m5!1s0x6b12ae665e892fdd:0x3133f8d75a1ac251!8m2!3d-33.8567844!4d151.2152967!16zL20vMDZfbm0

-33.8567844

151.2152967

https://www.google.com/maps/search/?api=1&query=47.5951518,-122.3316393

47.5951518

-122.3316393

https://maps.google.com/?q=51.4778,-0.0015

51.4778

-0.0015

https://www.google.com/maps/search/?api=1&query=47.5951518%2C-122.3316393

47.5951518

-122.3316393

https://www.google.com/maps/place/Test/@38.1,-77.1,17z/data=!4m2!3m1!8m2!3d38.8976763!4d-77.0365298?entry=ttu

38.8976763

-77.0365298

https://maps.app.goo.gl/abc123XYZ

no coordinates

no coordinates

What was not tested

  • Google Sheets, Excel for Mac, Excel for the web, and Excel versions older than Microsoft 365. Microsoft lists NUMBERVALUE, SEARCH and IFERROR for Excel 2016 and later, but we ran the formulas only in Excel for Microsoft 365 on Windows.

  • Computers set to use a comma as the decimal separator.

  • Link shapes other than the ones in the table.

Before you trust a whole column, filter for "no coordinates" and check a few results on a map.

Rows that return "no coordinates" need a manual step. Open the link in a browser. When Google Maps has loaded, the address bar shows the full link. Copy it into column A. If it has one of the shapes described above, the formulas read it.

If you would rather read the coordinates from the map, Google's help page on finding and entering coordinates gives these steps:

  • On a computer, right-click the place or area on the map. A pop-up window shows the latitude and longitude in decimal format at the top. Click them to copy.

  • On Android, touch and hold an unlabeled area of the map to drop a red pin. The coordinates appear in the search box.

  • On iPhone and iPad, drop a pin the same way. The coordinates appear in the place sheet.

The same steps answer the related question of how to find the coordinates for an address in Google Maps: search for the address, then right-click the pin on a computer. Paste the latitude and the longitude into their own columns.

Open the links by hand. A script that opens Google links in bulk to collect coordinates is automated access to Google's service.

What to do with the coordinates next

  • To see the points in Google Earth, our free CSV and Excel to KML converter turns latitude and longitude columns into placemarks. The file is read in your browser and not uploaded. The free tool takes up to 50 rows per file. GaleriGIS Toolbox removes the row limit for $15 per month.

  • If you need UTM or degrees, minutes and seconds, our UTM, lat long and DMS converter converts one point at a time.

  • If you were sent coordinates as degrees, minutes and seconds instead of links, our guide to DMS to decimal degrees has Excel formulas for that.

  • If your list has street addresses instead of links, you need a geocoder. Our article on how to plot multiple addresses on a map covers that.

We make GaleriGIS. Our Windows app, GaleriGIS Pro, imports Excel and CSV files with coordinates directly onto the map, but you do not need it for anything in this article.

Frequently asked questions

How do I convert a Google Maps link to coordinates in Excel?

Put the link in A2 and use the combined latitude and longitude formulas above. They read the place pin (!3d and !4d), the map center (@) or the search coordinates (q= or query=).

Why does my link return "no coordinates"?

It may be a short maps.app.goo.gl link, or a link that names a place without giving coordinates. Open it in a browser and copy the full address from the address bar.

Which numbers in the link are the right ones?

Prefer !3d and !4d, which belong to the place. The numbers after @ are the center of the map view.

Do the formulas work in Google Sheets?

We have not tested them there.

How do I get the coordinates of an address in Google Maps?

Search for the address, then right-click the place on a computer. The latitude and longitude appear at the top of the pop-up, in decimal degrees, and a click copies them.