How a Google Search Ad Wins Its Auction, Step by Step

15 min read

The problem

You set a bid of $4 on a keyword. Your competitor bids $2.50. Their ad sits above yours, and they pay less per click than you do. That feels like a bug. It is the system working as designed.

Google Search ads are not sold to the highest bidder. Every search runs a fresh auction, and the thing that wins is Ad Rank, a score that mixes your bid with Google's guess about how useful your ad will be for this person, right now. Once you see the moving parts, the $2.50 ad on top stops being a mystery.

This part follows one search from Enter to invoice: which ads get in, how they are ranked, what the winner pays, how automated bidding changes the bid, how the click is tied to a sale, and how the budget gets spent. Everything comes from Google's own Help pages and blog posts, linked under Sources. Where Google does not publish a formula, this post says so.

From a typed query to a list of candidates

Say someone searches for red running shoes size 10. Before any auction, Google has to decide which advertisers' keywords match that search at all. That is what match types control.

Match typeHow you write itWhat it can match, per Google
Broad matchred shoeSearches related to your keyword, including ones that do not contain the words. This is the default.
Phrase match"red shoe"Searches that include the meaning of your keyword.
Exact match[red shoe]Searches with the same meaning or same intent as your keyword.

Broad is the widest net. Google says broad match can also use signals such as recent search activity, the content of your landing page, and the other keywords in your ad group to work out what is related. The broader types also pick up everything the narrower ones would. Negative keywords pull the other way: they stop your ad from showing for searches you name.

Two more details. If the same keyword sits in several places in your account, Google enters only the one with the higher Ad Rank, so you do not bid against yourself. And Google's own advice is that Smart Bidding works best with broad match.

Matching is only the first gate. The ad still has to be allowed to run for this person under its campaign settings and Google's ad policies, and then it has to earn its place: as the next section shows, Google uses Ad Rank itself to decide whether an ad is eligible to show at all.

flowchart LR
  Q[Search typed] ==> M[Keyword matching: broad, phrase, exact, negatives]
  M ==> E[Allowed to run: settings and policies]
  E ==> R[Ad Rank for each candidate]
  R ==> T{Above the Ad Rank threshold?}
  T ==>|no| X[Not shown]
  T ==>|yes| P[Position by Ad Rank]
  P ==> C[Price: actual CPC]

Ad Rank: what Google says goes in

Google's Help page on Ad Rank is unusually direct about the inputs. It lists six:

  1. Your bid. The maximum you are willing to pay for a click. Google adds that what you actually pay is often less.
  2. The quality of your ads and landing page. How relevant and useful the ad and the page behind it are to the person searching. At auction time this can include measurements like expected click through rate, ad relevance and landing page experience.
  3. Ad Rank thresholds. Minimum scores an ad must reach to show at all, and higher ones to show in better spots.
  4. Competitiveness of the auction. If two ads have close Ad Ranks, each has a similar chance at a position. As the gap grows, the higher ad is more certain to win, and Google says it may pay more for that certainty.
  5. The context of the search. The search terms, the person's location, device and time of the search, the nature of the terms, the other ads and results on the page, and other user signals.
  6. Expected impact of assets. Assets are the extras like sitelinks or callouts. Google estimates how they will affect performance and factors that in.

Two sentences on that page are worth reading slowly. Ad Rank "is calculated every time a user does a search", and it is calculated twice: once to decide if your ad is eligible to show, and again to decide its position. Google also says it runs different auctions for each ad location, so the spots above the results and the spots below are not one single sale.

Diagram: six inputs feed Ad Rank, which decides eligibility, position and actual CPC

What Google does not publish is the formula. There is no official weighting of bid against quality. Any post that gives you "Ad Rank = bid × Quality Score" as Google's exact maths is guessing. It is a useful mental model, and the toy below uses it, but it is a model.

Quality Score is a report card, not an input

This is the most common misunderstanding in search ads, and Google's Help page settles it in plain words: Quality Score "is a diagnostic tool", and it is "not an input in the ad auction".

Quality Score is the 1 to 10 number you see next to each keyword in your account. It summarises three components:

ComponentWhat it estimates
Expected CTRHow likely your ad is to be clicked when shown
Ad relevanceHow closely your ad matches the intent behind the search
Landing page experienceHow relevant and useful your page is to people who click

Each one is rated Above average, Average or Below average. The comparison is against other advertisers whose ads showed for the exact same search over the last 90 days. That last detail is why the score is a diagnostic and not a live signal: it is built from past impressions on exact searches, and Google notes it may not capture things like device, location, time of day or assets, which the real auction does consider.

So the right way to read it: if a keyword has Quality Score 3 with "Below average" landing page experience, the auction is probably rating that ad and page poorly too, and fixing the page is likely to help. But raising the number itself does nothing. The auction looks at auction-time quality, computed fresh for each search.

What the winner pays

Google's definition of actual CPC is the cleanest description of the pricing rule: you pay "what's minimally required to clear the Ad Rank thresholds and beat the Ad Rank of the competitor immediately below you".

Google's Help page works through an example with five advertisers whose Ad Ranks are 80, 50, 30, 10 and 5:

  • The minimum Ad Rank to show above the results is 40. The ad at 80 pays just enough to beat the 50 below it, rounded to the nearest cent in the US. The ad at 50 pays just enough to clear the threshold of 40.
  • The minimum to show below the results is 8. The ad at 30 pays enough to beat 10, the ad at 10 pays enough to clear 8, and the ad at 5 does not show at all.

A few more rules from the same page:

  • If no one is below you, you pay the reserve price, which is the threshold rounded up to the smallest billable unit.
  • Thresholds and actual CPCs are typically higher for positions above the search results.
  • You are never charged more than your max CPC bid, unless you use automated bidding, where the system sets the bid for each auction.
  • Thresholds are not fixed. Google sets them dynamically per auction, based on ad quality (lower quality means a higher threshold), position, user signals like location and device, and the nature of the search.

Notice the link back to quality. Your price depends on the Ad Rank you need to beat, and your own quality helps you get there with less bid. That is how the $2.50 bidder wins and pays less.

A toy auction you can run

To make this concrete, here is a tiny simulation. It is illustrative only. Google's formula is not public. This toy keeps just the shape Google describes: rank by bid and quality, drop ads below a threshold, charge each ad the least it needs to beat the one below or clear its threshold, and never more than its bid.

The rules of the toy:

  • Toy Ad Rank = bid × q, where q is a made up quality number between 0 and 1.
  • Show threshold 1.00, top threshold 1.80, both invented.
  • Price = (the Ad Rank to beat ÷ your own q) + $0.01, capped at your bid.
python
"""A toy search ad auction. Illustrative only.

Google does not publish its Ad Rank formula. This toy keeps only the shape
Google describes in Help: rank by bid and quality, drop anyone below a
threshold, and charge each winner the least it needs to beat the ad below it
(or clear the threshold), never more than its own max bid.
"""

ADVERTISERS = [
    # name, max CPC bid in dollars, toy quality score between 0 and 1
    ("Shoe Shack", 4.00, 0.50),
    ("RunFast", 2.50, 0.90),
    ("Budget Kicks", 3.00, 0.40),
]

SHOW_THRESHOLD = 1.00  # toy minimum Ad Rank to show at all
TOP_THRESHOLD = 1.80   # toy minimum Ad Rank to show above the results
STEP = 0.01            # smallest billable unit


def run_auction(ads, show_min, top_min):
    ranked = sorted(
        ({"name": n, "bid": b, "q": q, "rank": b * q} for n, b, q in ads),
        key=lambda a: a["rank"],
        reverse=True,
    )
    shown = [a for a in ranked if a["rank"] >= show_min]
    for i, ad in enumerate(shown):
        ad["slot"] = "top" if ad["rank"] >= top_min else "bottom"
        own_min = top_min if ad["slot"] == "top" else show_min
        below = shown[i + 1]["rank"] if i + 1 < len(shown) else 0.0
        to_beat = max(below, own_min)
        price = round(to_beat / ad["q"] + STEP, 2)
        ad["cpc"] = min(price, ad["bid"])
    dropped = [a for a in ranked if a["rank"] < show_min]
    return shown, dropped


def main():
    shown, dropped = run_auction(ADVERTISERS, SHOW_THRESHOLD, TOP_THRESHOLD)
    print(f"{'pos':<4}{'advertiser':<14}{'bid':>6}{'q':>6}{'rank':>7}{'slot':>8}{'pays':>7}")
    for pos, a in enumerate(shown, 1):
        print(f"{pos:<4}{a['name']:<14}{a['bid']:>6.2f}{a['q']:>6.2f}"
              f"{a['rank']:>7.2f}{a['slot']:>8}{a['cpc']:>7.2f}")
    for a in dropped:
        print(f"{'-':<4}{a['name']:<14}{a['bid']:>6.2f}{a['q']:>6.2f}"
              f"{a['rank']:>7.2f}{'none':>8}{'0.00':>7}")

    print("\nSame auction, RunFast's quality falls to 0.60:")
    changed = [(n, b, 0.60 if n == "RunFast" else q) for n, b, q in ADVERTISERS]
    shown, dropped = run_auction(changed, SHOW_THRESHOLD, TOP_THRESHOLD)
    for pos, a in enumerate(shown, 1):
        print(f"{pos:<4}{a['name']:<14}{a['bid']:>6.2f}{a['q']:>6.2f}"
              f"{a['rank']:>7.2f}{a['slot']:>8}{a['cpc']:>7.2f}")
    for a in dropped:
        print(f"{'-':<4}{a['name']:<14}{a['bid']:>6.2f}{a['q']:>6.2f}"
              f"{a['rank']:>7.2f}{'none':>8}{'0.00':>7}")


if __name__ == "__main__":
    main()

We ran it with Python 3 on this VM. The output, pasted as is:

text
pos advertiser       bid     q   rank    slot   pays
1   RunFast         2.50  0.90   2.25     top   2.23
2   Shoe Shack      4.00  0.50   2.00     top   3.61
3   Budget Kicks    3.00  0.40   1.20  bottom   2.51

Same auction, RunFast's quality falls to 0.60:
1   Shoe Shack      4.00  0.50   2.00     top   3.61
2   RunFast         2.50  0.60   1.50  bottom   2.01
3   Budget Kicks    3.00  0.40   1.20  bottom   2.51

The same first run as a table (illustrative numbers, not real Google data):

PositionAdvertiserMax bidToy qToy Ad RankMust beatPays
1 (top)RunFast$2.500.902.252.00 (Shoe Shack)$2.23
2 (top)Shoe Shack$4.000.502.001.80 (top threshold)$3.61
3 (below)Budget Kicks$3.000.401.201.00 (show threshold)$2.51

Bar chart of the toy auction: max bids against toy actual CPCs for three advertisers

Three things to notice. The lowest bidder wins the top spot because its quality is high. Shoe Shack pays the most, $3.61, because a weak q means it needs a lot of bid to clear the top threshold. And in the second run, a drop in RunFast's quality alone pushes it out of the top spots, with no change in anyone's bid. The real system is far more complex, but this is the direction Google's own description points.

First price, second price, and why search is different

You will often read that Google "moved to first-price auctions in 2019". That is true for a specific product, and mixing it up with search causes a lot of confusion.

In a second-price auction, the winner pays roughly what was needed to beat the next bid. In a first-price auction, the winner pays what it bid. Search pricing, as described above, has the second-price shape: you pay what you need to beat the Ad Rank below you, not your full bid.

The 2019 change was in Google Ad Manager, the publisher-side ad server, for display and video ads. On March 6, 2019, Google announced it would move Ad Manager to a unified first-price auction. Its announcement says the change "only impacts display and video inventory sold via Ad Manager" and "will have no impact on auctions for ads on Google Search, AdSense for Search, YouTube" and other Google properties. A later Google post explained the old setup: a second-price auction among Authorized Buyers, followed by a comparison against other demand. In September 2019, Google said tests showed a "neutral to positive impact" and that full rollout was starting.

AdSense for display followed later. In October 2021, Google announced that AdSense was moving to a first-price auction too, for AdSense for Content, Video and Games.

So the clean version is:

WherePricing shapeSource
Google Search adsPay the minimum needed to beat the Ad Rank below and clear thresholdsGoogle Ads Help, actual CPC
Google Ad Manager display and videoFirst-price since 2019Google Ad Manager blog, 2019
AdSense for ContentFirst-price since 2021Google AdSense blog and Help, 2021

The display side gets its own part: how real-time bidding fills an ad slot.

Smart Bidding: a new bid for every search

So far we treated your bid as a fixed number. With Smart Bidding, it is not. Google describes Smart Bidding as bid strategies that "use Google AI to optimize for conversions or conversion value in every auction", a feature it calls auction-time bidding.

The main strategies:

StrategyYou tell GoogleGoogle tries to
Target CPAThe average cost per conversion you wantGet as many conversions as possible at that average cost
Target ROASThe return on ad spend you wantGet as much conversion value as possible at that return
Maximize conversionsYour budgetGet the most conversions for the budget
Maximize conversion valueYour budgetGet the most conversion value for the budget

Google's Help page also notes a relabel in 2026: "Maximize conversions with a Target CPA" is shown as "Target CPA", with the same behaviour.

The point is the signals. For each search, the bid can respond to device, physical location, location intent, weekday and time of day, remarketing lists, ad characteristics, interface language, browser, operating system, the actual query, and whether the ad shows on a search partner, plus extra signals for Display, Shopping and Hotel campaigns. No human can combine all of that per search. That is the pitch.

Two practical notes from Google. Smart Bidding needs conversion tracking, because conversions are what it is optimising. And when you judge it, Google suggests looking at periods with at least 30 conversions, or 50 for Target ROAS. One more: Enhanced CPC, an older half automated option, is no longer available for Search and Display campaigns, effective the week of March 31, 2025.

How the click gets tied to the sale

Smart Bidding is only as good as the conversion data behind it. Here is the chain, as Google documents it.

1. The click carries an ID. With auto-tagging on, Google adds a GCLID, a Google click identifier, to the landing page URL. Google calls it a "URL parameter passed with ad clicks" and says it is required for Google Ads website conversion tracking.

2. Your site stores it. The Google tag (gtag.js) or a Conversion Linker tag in Google Tag Manager reads the ad click information from the URL and stores it in first-party cookies on your domain, named _gcl_* (for example _gcl_aw), plus browser local storage under _gcl_ls. Google's tracking article says that if you do not want the tag to set first-party cookies, you can turn that off in the tag config with 'conversion_linker': false.

3. The conversion fires. When the person buys or signs up, your conversion tag reads the stored click information and sends it to Google Ads with the conversion.

4. Enhanced conversions fill gaps. Cookies are not always there. Enhanced conversions let the tag send first-party data the customer gave you, such as an email address, hashed with SHA-256 before it is sent. Google's normalisation rules include trimming whitespace and lowercasing, and formatting phone numbers in E.164. Google matches the hashes against signed-in Google accounts.

5. Consent decides what is allowed. Consent mode passes the visitor's choices to Google tags through consent types such as ad_storage, ad_user_data, ad_personalization and analytics_storage. In basic mode, tags do not load until the visitor consents. In advanced mode, tags load and send cookieless pings when consent is denied, which Google uses for conversion modelling.

sequenceDiagram
  participant U as Searcher
  participant G as Google Ads
  participant S as Your site
  U->>G: Clicks ad
  G->>S: Landing URL with gclid
  S->>S: Google tag stores click in _gcl cookie (if consent allows)
  U->>S: Buys something
  S->>G: Conversion tag sends click info, plus SHA-256 hashed email if enhanced conversions is on
  G->>G: Matches conversion to the click, feeds Smart Bidding

If the chain breaks anywhere, for example a redirect strips the gclid, the click and the sale never meet, and Smart Bidding learns from less data than you think.

Budgets and pacing: why one day can cost double

Last surprise. You set a $10 daily budget and a day comes in at $18. Google says this is expected.

From Google's Help page on spending limits:

  • On any single day, most campaigns can spend up to 2 times the average daily budget. With $10 a day, that is up to $20.
  • Across a month, you will not be charged more than 30.4 times the average daily budget. 30.4 is the average number of days in a month (365 ÷ 12). With $10 a day, that is $304.
  • If you change the budget in the middle of the month, the monthly limit is worked out from the new budget for the remaining days.
  • If serving goes over the limit anyway, the billed cost is capped and, in Google's words, "Google will cover the difference" as an overdelivery credit.

Search traffic is lumpy, so Google spends more on busy days and less on quiet ones, aiming to land the month near your average. If one day must never exceed a number, the daily budget alone will not guarantee it.

What's next

That is the search side: one query, one auction, a price set by the ad below you. The other side of Google's business runs the other way round: a publisher puts a slot on a page and Google fills it. Next up: how AdSense and Auto ads decide where ads go, including what the AdSense tag actually does in your browser.

Sources