EnableYourData.com

KPI · Marketing

CPM (cost per mille): formula and example.

CPM, cost per mille, is your ad spend per thousand impressions. It shows how expensive it is to buy reach on a platform or with an audience. CPM is mainly used for campaigns focused on awareness and visibility.

CPM (cost per mille) formula

Ad spend ÷ number of impressions × 1,000

Worked example

In September, Acme Groothandel spent €3,600 on a Meta Ads campaign that was shown 450,000 times. CPM is €3,600 ÷ 450,000 × 1,000 = €8.

Fictitious figures for Acme Groothandel, a sample wholesaler.

How to read this KPI

A lower CPM means cheaper reach. CPM varies by platform, audience, season and ad format, so mainly compare it with your own campaigns in the same period. A low CPM only has value if the right people see your ad, so look at CTR and conversions as well.

Pitfalls with CPM (cost per mille)

  • Treating impressions as reach, while one person often sees your ad several times.
  • Comparing CPMs between platforms that count impressions differently.
  • Choosing the cheapest audience even though it does not match your customers.

SQL & DAX

Calculating CPM (cost per mille) in SQL and DAX

Two examples on a fictitious data warehouse for Acme Groothandel: a PostgreSQL query and a measure for a Power BI model. Adjust table and column names to your own model.

SQL · PostgreSQL
SELECT date_trunc('month', spend_date) AS month,
       platform,
       SUM(cost) AS cost,
       SUM(impressions) AS impressions,
       ROUND(1000 * SUM(cost) / NULLIF(SUM(impressions), 0), 2) AS cpm
FROM ad_spend
GROUP BY 1, 2
ORDER BY 1, 2;
DAX · Power BI
CPM =
DIVIDE(
    SUM(AdSpend[Cost]),
    SUM(AdSpend[Impressions])
) * 1000

In ENABLE

Tracking this KPI in ENABLE

Plain-language questions

Ask for CPM (cost per mille) per month, customer or product in the SQL Explorer with AI. The AI writes the SQL, you see the query and run it yourself; the AI only receives metadata.

Read more →

In your Power BI dashboard

Define the KPI as a measure in your Power BI model and show it in the portal, with "Last refreshed" next to it. Access profiles and optional row-level security decide who sees which figures.

Read more →

Custom dashboards (pilot)

Add the KPI as a tile to a custom dashboard, compared with last year. The Dashboard Builder is a pilot and can be switched on per client.

Read more →

Monthly targets

With the built-in Targets app you set a target for the KPI per month, so you see actuals and target side by side.

Read more →

FAQ

Frequently asked questions

How do you calculate CPM?

Divide ad spend by the number of impressions and multiply by 1,000. With €3,600 and 450,000 impressions, CPM is €8. Mille is Latin for thousand.

When should you choose CPM over CPC?

Choose CPM when the goal is reach or awareness, and CPC when you want visits or conversions. With CPM you pay for visibility, even if nobody clicks. Measure CTR in both cases to see whether the ad resonates.

What is the difference between impressions and reach?

Impressions are the total number of times your ad was shown, while reach is the number of unique people who saw it. Impressions divided by reach gives the frequency. CPM therefore tells you about impressions, not about how many people you reach.

Use AI on your own data. Securely, and without the headache.

In an online demo we show how ENABLE makes your data securely available and how you build on it: describing an app in the AI Builder, plain-language questions, dashboards and APIs. And how we set it up and manage it for you.