What decides who ranks first on Google Maps?
The short answer
Google says local rankings are decided mainly by relevance, distance and prominence: how well a business matches the search, how far it is from the searcher, and how well known it is. Google does not publish the exact weighting, and the mix changes with every search.
What Google has actually said
Google's own help pages describe three main factors for local results. Relevance is how well a profile matches what someone is looking for. Distance is how far each business is from the location used in the search. Prominence is how well known a business is, which Google says draws on information from across the web, such as links, articles and directories, as well as review count and score.
Google also says that completing your profile, keeping hours accurate, verifying your location and responding to reviews can help. Beyond that, it does not publish a formula. Anything more specific you read is based on testing and observation rather than a statement from Google.
Relevance: what your business is known for
Relevance comes from your primary and additional categories, the services you list, your description and, very often, your website. An accountant who wants to show for "tax return help" has a better chance when the profile and the website both make it obvious that this is a core service. See how to choose a primary category.
Distance and prominence: where you are and how well known you are
When someone searches without naming a place, Google uses their location. When they name a suburb or town, Google uses that. You cannot change this factor without moving, which is why the same business ranks differently on each street. See how much distance matters.
Reviews are the part of prominence most owners can see, but Google also looks at mentions and links across the web. A long-established hardware store with local press coverage and plenty of reviews will usually look more prominent than a new shop with a handful. See whether reviews help Maps rankings.
Why the top spot varies by business and area
The balance between these factors is different for every search. In a small town with two hairdressers, distance may hardly matter. In central Auckland, with dozens of competitors within walking distance, small differences in relevance and prominence decide who appears first. That is why the useful comparison is always between you and the specific businesses ahead of you, in the places your customers are searching from.