Revenue

How to calculate CPM, with worked examples for buyers and publishers

Calculate CPM by dividing cost by impressions and multiplying by 1,000. Worked examples, reverse formulas, a spreadsheet formula and the publisher view.

Calculate CPM formula drawn as a fraction: CPM equals cost over impressions times 1,000, with a $3.75 worked example

To calculate CPM, divide the total cost by the number of impressions and multiply by 1,000. So $450 spent on 120,000 impressions is $450 ÷ 120,000 × 1,000 = a $3.75 CPM. CPM means cost per thousand impressions, and the same formula works for a publisher's revenue.

The division is easy. What goes wrong is the inputs: a CPM averaged across partners, gross money mixed with net, or page views used where impressions belong. Any of those gives you a number that looks fine and still misleads your pricing. Below you'll find the formula, worked examples for buyers and publishers, the spreadsheet version and the mistakes we see most. If you only need the publisher metric, our guide to eCPM for publishers covers it in depth.

The CPM formula and what each part means

The CPM formula is CPM = (total cost ÷ total impressions) × 1,000. The "M" is the Roman numeral for a thousand, so CPM reads as cost per mille, or cost per thousand impressions.

Google describes CPM in Google Ads as a way to bid where you "pay per one thousand views (impressions)" on the Display Network, in its CPM definition. Each part of the formula has one job:

  • Total cost: the money spent (for a buyer) or earned (for a publisher) in one time range and one currency.
  • Total impressions: the ads served in that same range, from the same report.
  • × 1,000: turns a tiny cost per single impression into a readable price per thousand.
CPM         = cost ÷ impressions × 1,000
Total cost  = CPM × impressions ÷ 1,000
Impressions = cost ÷ CPM × 1,000

Those three lines are the whole toolkit. If you know any two of cost, impressions and CPM, you can find the third.

How to calculate CPM step by step

Here's how to calculate CPM from a report in four steps. It takes a minute once you've picked the right numbers.

  1. Pick one date range and pull the cost (or revenue) and the impressions for exactly that range.
  2. Check both numbers come from the same source and the same currency, and note whether the money is gross or net.
  3. Divide the cost by the impressions. You'll get a small number, such as 0.00375.
  4. Multiply that result by 1,000 and round to two decimals. 0.00375 × 1,000 = $3.75.

Watch out for this. If your answer looks like $0.004 or $3,750, you skipped the × 1,000 or applied it twice. Check the answer against the rates your reports usually show.

Worked examples of the CPM calculation

Each CPM calculation below uses one of the three formulas. The numbers are examples, not market rates.

Example 1: CPM from cost and impressions

An advertiser spends $450 and gets 120,000 impressions. $450 ÷ 120,000 = 0.00375. Multiply by 1,000 and the CPM is $3.75.

Example 2: total cost from CPM and impressions

A direct advertiser wants 250,000 impressions at a $6 CPM. $6 × 250,000 ÷ 1,000 = $1,500. That's the figure for your insertion order.

Example 3: impressions from budget and CPM

A buyer has $2,000 and expects an $8 CPM. $2,000 ÷ $8 × 1,000 = 250,000 impressions. Use this to check whether your site has enough inventory before you say yes to an agency's deal request. Buyers run the same sum for every channel in a plan, as our guide to how digital media buying works shows.

That $8 is what's left after the buyer's own costs. Agency fees, DSP fees and data come out first, as our breakdown of how programmatic agencies charge shows.

You knowYou wantFormulaExample
Cost and impressionsCPMcost ÷ impressions × 1,000$450 ÷ 120,000 × 1,000 = $3.75
CPM and impressionsTotal costCPM × impressions ÷ 1,000$6 × 250,000 ÷ 1,000 = $1,500
Budget and CPMImpressionsbudget ÷ CPM × 1,000$2,000 ÷ $8 × 1,000 = 250,000

How publishers calculate CPM from revenue

Publishers calculate CPM the same way, with revenue in place of cost. Earnings ÷ impressions × 1,000 gives your effective CPM, or eCPM: what you actually made per thousand impressions after every auction, floor and unfilled request.

Say your site earned $36 from 15,000 ad impressions yesterday. $36 ÷ 15,000 × 1,000 = a $2.40 eCPM. Those ads ran on 6,000 page views, so your page RPM is $36 ÷ 6,000 × 1,000 = $6.00.

That second number is the one Google AdSense shows as RPM. Google's AdSense RPM help page gives the formula as "RPM = (Estimated earnings / Number of page views) * 1000". Its own example: $180 from 45,000 ad impressions is a $4.00 impression RPM.

  • CPM: the price a buyer pays per thousand impressions.
  • eCPM: what a publisher earns per thousand impressions, all sources blended.
  • Page RPM: what a publisher earns per thousand page views, so more ads per page raise it.

In Google Ad Manager you'll find this in the "average eCPM" metrics in reporting, as its value CPM help page notes. For how AdSense turns buyer CPMs into your share, see AdSense CPM vs RPM explained.

Calculate CPM in Excel or Google Sheets

To calculate CPM in Excel or Google Sheets, divide the cost cell by the impressions cell and multiply by 1,000. The same formula works in both.

Put the date in column A, cost or revenue in column B and impressions in column C. Then paste these into column D:

Daily CPM, row 2:         =IF(C2=0,"",ROUND(B2/C2*1000,2))
Blended CPM, rows 2-31:   =SUM(B2:B31)/SUM(C2:C31)*1000
Total cost from CPM:      =D2*C2/1000
Impressions from budget:  =B2/D2*1000

The IF guard stops a #DIV/0! error on days with zero impressions. Use the blended formula for any period total. Never average the daily CPM column; the next section shows why.

Mistakes that make a CPM calculation wrong

Most wrong CPMs come from the inputs, not the maths. When we review a publisher's reports, these are the first things we check.

Averaging CPMs instead of adding totals

Partner A earns $1,000 from 500,000 impressions, a $2.00 CPM. Partner B earns $90 from 10,000 impressions, a $9.00 CPM. The simple average is $5.50. The real blended CPM is $1,090 ÷ 510,000 × 1,000 = $2.14.

The small partner looks like it doubles your rate, but it barely moves it. Always add the money, add the impressions, then divide.

Mixing gross and net money

A buyer pays a gross CPM. You're paid a net CPM after your partner's share. Say a partner keeps 20% (shares vary by partner): a $5.00 gross CPM is $4.00 net. Compare like with like.

Using the wrong impression count

Ad requests, served impressions, measured impressions and viewable impressions are four different numbers. Dividing by page views gives page RPM, not CPM. Pick one count and keep it for every period you compare.

Comparing reports that don't match

Your ad server and a partner's dashboard rarely count impressions exactly the same. Calculate each partner's CPM from its own report, and check time zones and currency before you compare.

Viewable CPM and CPC to CPM conversion

Viewable CPM uses only viewable impressions in the formula, so it's always equal to or higher than the plain CPM for the same spend.

Google Ads counts a display ad as viewable "when at least 50% of its area is visible on the screen for at least one second", per its viewability and Active View help page. Say $300 bought 100,000 measured impressions and 60,000 were viewable. The CPM is $3.00. The viewable CPM is $300 ÷ 60,000 × 1,000 = $5.00.

You can also turn a cost per click into a CPM: CPM = CPC × CTR × 1,000. A $0.40 CPC with a 0.5% click-through rate is 0.40 × 0.005 × 1,000 = a $2.00 CPM. That helps when you compare a CPC offer with a CPM one.

  • Viewable CPM = cost ÷ viewable impressions × 1,000
  • CPM from CPC = CPC × CTR (as a decimal) × 1,000
  • CPC from CPM = CPM ÷ (CTR × 1,000)

What is a good CPM?

There's no single good CPM. It depends on the country your visitors come from, your niche, the ad format, the season and how viewable your slots are. A rate that's strong for one site can be weak for another.

The useful comparison is your own history. Calculate CPM the same way every week, from the same report, and watch the trend. If you sell ad space directly, check that your quoted CPM beats what the open auction already pays you for the same slot.

When your rate dips, look at fill and viewability before you blame the price. Our guide to interstitial ads CPM shows how a higher rate can still lower page RPM. And if you're sizing up traffic goals, what 1 million impressions a month can earn walks through the maths at scale.

Frequently asked questions

What is the formula to calculate CPM?

CPM = total cost ÷ total impressions × 1,000. For a publisher, use revenue instead of cost. $450 spent on 120,000 impressions is a $3.75 CPM.

Why do you multiply by 1,000 in the CPM formula?

CPM is priced per thousand impressions, not per impression. The cost of a single impression is a very small number, so multiplying by 1,000 gives one that's easy to read and compare.

Is cost per thousand impressions the same as RPM?

No. Cost per thousand impressions is what a buyer pays. RPM is what a publisher earns, and Google AdSense's page RPM divides by page views rather than impressions.

How do I calculate CPM for several campaigns or partners?

Add all the costs, add all the impressions, then divide and multiply by 1,000. Averaging each campaign's CPM gives the wrong answer whenever their volumes differ.

Can I calculate CPM in Google Sheets?

Yes. With cost in B2 and impressions in C2, use =IF(C2=0,"",B2/C2*1000). The same formula works in Excel.

Next step: calculate CPM for your own site

Add the money, add the impressions, divide, then multiply by 1,000. To skip the maths, our free eCPM calculator also works as a CPM calculator: it solves for CPM, revenue or impressions, and the ad revenue calculator turns page views into an estimate. When you want a higher rate from the same traffic, see how our web monetization service works.

Free tools

Is your site ready for Google AdX?

Check your AdX eligibility

Our current screening asks for $1,000 or more in two separate months of the last three, and invalid traffic under 10%.

Free AdX readiness checklist (PDF)

The 25 checks we run before recommending a site for AdX through MCM. Enter your details and download it straight away.

We will only use your email to reply about your site.

WhatsApp