Learn how to calculate CPM in digital marketing — the formula, real examples, how to find impressions from a budget, common mistakes, and when to use a calculator instead.
Before we get into how to calculate CPM, let's make sure we're on the same page about what CPM actually is.
CPM stands for Cost Per Mille — "mille" being the Latin word for thousand. In digital marketing, CPM is the price an advertiser pays for 1,000 ad impressions. An impression is counted every time your ad appears on someone's screen, whether they click it or not.
CPM is the standard pricing model for display advertising, YouTube video ads, Facebook reach campaigns, programmatic buying, and most brand awareness campaigns. If you've ever looked at a campaign report and seen a number like "$4.50 CPM", that means the advertiser paid $4.50 every time their ad was shown 1,000 times.
For publishers — website owners, YouTube creators, and app developers — CPM represents the revenue they earn per 1,000 ad impressions served to their audience.
The CPM formula is one of the simplest in all of digital marketing. Here it is:
That's it. Divide what you spent by how many impressions you received, then multiply by 1,000. The result is your CPM.
The CPM formula has two other useful variants — one for finding cost and one for finding impressions:
Know any two of the three values — CPM, cost, and impressions — and you can always calculate the third. This flexibility is what makes the CPM formula so useful for campaign planning.
Here's the process broken down into three clear steps.
This is your total ad spend for the campaign. Use the actual amount spent — not a daily average or projected number.
This is the total number of times your ad was shown. Find it in your ad platform's reporting dashboard.
Divide cost by impressions, then multiply by 1,000. The result is your CPM — the cost per thousand impressions.
That's really all there is to it. The math is simple — the challenge is just knowing where to find the numbers and understanding what to do with the result.
Let's walk through two real-world scenarios so you can see exactly how to calculate CPM in practice.
Total spend: $300
Total impressions: 150,000
Calculation: ($300 ÷ 150,000) × 1,000
You paid $2 for every 1,000 times your ad appeared in Facebook's feed. This is a competitive CPM for a broad awareness campaign.
Total spend: $10,000
Total impressions: 500,000
Calculation: ($10,000 ÷ 500,000) × 1,000
Finance audiences command premium rates. A $20 CPM here reflects the high advertiser demand for this specific, valuable audience segment.
Both examples use the exact same formula — the inputs just change. Once you understand how to calculate CPM, you can apply it to any platform and any campaign size.
This is the most common scenario: you have your spend and your impression count, and you want to know your CPM. The formula is exactly what we covered above:
A few practical tips when calculating CPM from impressions and cost:
Quick tip: To avoid calculation errors, use our free CPM calculator at cpmrevenue.website. Enter your cost and impressions and get your CPM instantly — no spreadsheet needed.
Sometimes you're planning a campaign and you already know your CPM rate — you just want to figure out how many impressions you can get from a given budget. This is where the impressions formula comes in.
This is also referred to as how to calculate impressions from CPM and budget — and it's one of the most useful pre-campaign calculations you can do.
Example: You have a $1,000 budget and your platform is charging a $5 CPM. How many impressions will you get?
Impressions = ($1,000 ÷ $5) × 1,000 = 200,000 impressions
You can also flip this to calculate impressions with CPM and cost for any scenario — change the budget or the CPM rate and instantly see how your reach changes. This is how professional media buyers compare platforms before committing budget.
If you're working with campaign data in a spreadsheet, here are the exact Excel formulas for each CPM calculation.
Calculate CPM (Cost in B2, Impressions in C2):
Calculate Cost (CPM in B2, Impressions in C2):
Calculate Impressions (Budget in B2, CPM in C2):
All three CPM Excel formulas work identically in Google Sheets. Add =IFERROR(..., 0) around any of them to avoid #DIV/0! errors when cells are empty.
For a complete Excel tracking template and more advanced formulas, see our dedicated CPM Formula Excel guide.
These are the errors that most beginners make when learning how to calculate CPM in digital marketing.
(Cost ÷ Impressions) gives you cost per single impression — you must multiply by 1,000 to get CPM.If you find yourself calculating CPM regularly — whether for reporting, planning, or comparing campaigns — a dedicated CPM calculator saves significant time and eliminates arithmetic errors.
Our free CPM calculator at cpmrevenue.website supports all three calculation modes:
No signup, no registration, completely free. It's the fastest way to calculate CPM from impressions and cost without touching a spreadsheet.
For more on the different variants of the CPM formula and how to apply them, see our complete CPM Formula guide and our guide on how to CPM.