ForHosting KIT · Finance & money

CPM calculator

Divide what a campaign cost by its impressions and scale to one thousand: 5000 spent on 250000 impressions is a CPM of 20. Hold a placement against a publisher rate card or last week's blended number. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Cost
5,000
Impressions
250,000
You get
Cpm
20

Buyers compare display, video, social, and programmatic flights on that single figure before they accept a publisher rate card or raise a bid cap. Arithmetic is deterministic, with no network, no sampling, and no clock.

What a CPM figure tells you

Cost is the money actually invoiced or pulled from the ad account for the window you care about: media cost, and, if your finance team treats them as advertising, serving fees billed in the same currency. Impressions are the counted ad views in that same window: served impressions, or the viewable subset if that is the unit on the insertion order. Scaling the raw cost-per-view by one thousand yields a currency-per-thousand figure you can set beside a publisher rate card, a bid cap, or last week's blended number.

This calculator returns the echoed cost and impressions you submitted, the cpm result, and the formula string cpm equals cost divided by impressions times one thousand.

Where CPM thinking fits in media buying, reporting, and software

People meet CPM thinking when a media buyer asks whether a display placement is still cheaper per thousand views than a social prospecting ad set, when a publisher quotes a rate card in currency per mille, or when a finance partner asks why last month's blended CPM jumped after a brand burst. Performance teams pre-check whether a proposed daily budget at the current delivery rate still lands under a catalog or contribution-margin ceiling before they scale.

Growth engineers call the same contract from scripts to seed deterministic test vectors for bid dashboards, to normalize user-entered spend and impression counts before recommendation demos, or to satisfy product-challenge statements that demand a cpm field rather than a hand-waved efficiency claim. Homework and interview practice often needs a fast, offline source of thousand-block quotients so solutions can be checked without opaque spreadsheet macros under time pressure.

This identity is not a substitute for viewability audits, incrementality tests, or full customer acquisition cost that includes salaries and software, but it is the number every ad account already prints next to impressions.

Display and programmatic rate-card checks

Divide last week's campaign cost by counted impressions and scale by one thousand to see whether a placement still sits under its target CPM before you renew the insertion order.

Weekly blended CPM reporting

Roll several channels into one cost total and one impression total so finance and growth share a single blended cost-per-thousand figure.

How do I calculate CPM from campaign cost and impressions?

Send finite numbers cost (non-negative) and impressions (strictly positive).

Is this CPM calculator the same as CPC, CPA, or eCPM?

No. This identity uses campaign cost and impressions only. CPC needs clicks, CPA needs acquisitions, and eCPM typically divides revenue by impressions. Use a dedicated tool if you need those other ratios.

Can I send a fractional impression count reported by an ad platform?

Yes. Impressions may be a positive fraction such as an attributed view count of twelve thousand point five. The quotient still uses ordinary floating-point division scaled by one thousand, with stable rounding.

What happens if I enter zero impressions?

The calculator rejects it, because a cost divided by zero impressions has no price per thousand. Impressions must be above zero, while a cost of zero is accepted and gives a CPM of zero.

Which cost and which impressions should I use for CPM?

Use the money invoiced or pulled from the ad account for the window, adding serving fees only if your finance team counts them as advertising. For impressions, use served views, or the viewable ones if that is what you bought.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/fin/cpm

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/fin/cpm \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cost":5000,"impressions":250000}'
{
  "cost": 5000,
  "impressions": 250000
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "fin.cpm",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_abs_value1000000000000000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Cost per thousand impressions, almost always searched as a CPM calculator, is the media-buying identity that turns a campaign invoice into a price for one thousand ad views: total campaign cost divided by impressions, then multiplied by one thousand. This tool accepts campaign cost and impression count, returns the CPM value, and fails with invalid_input when impressions are zero or negative because that quotient is undefined. Use it free in the browser, or call the API at $0.002 per successful item for dashboards, insertion-order checks, and nightly budget scripts that must see the same figure every time.

What cost per thousand impressions means and what the response contains

Cost per mille, written CPM in every ad-ops console, is the campaign-level price of one thousand impressions: CPM equals cost divided by impressions, then multiplied by one thousand. There is no hidden tax, currency conversion, viewability filter, or multi-touch attribution model: the engine either scales two finite numbers inside the supported range or rejects the input with invalid_input. Rejected cases include missing cost or impressions, non-finite values, magnitudes above the documented ceiling, a negative cost, and any impressions value that is zero or negative, because division by zero is undefined and a non-positive impression count does not define a cost per thousand.

How cost and impressions are read and how the quotient stays reproducible

Optional leading plus signs and scientific notation on numeric strings are allowed when they parse as finite decimals; embedded spaces, hex prefixes, and non-numeric tokens are rejected with a clear message so a bad cell does not become a wrong CPM. Zero for cost is valid and simply yields zero cost per thousand when impressions is positive: a campaign that spent nothing and still recorded views has a CPM of zero in this identity. Negative cost is also rejected so the model stays an advertising-cost calculator rather than a signed ledger of rebates. The preferred fields are cost for total campaign spend in one currency unit and impressions for the number of ad views counted in the same window, but aliases spend, amount, total, campaign_cost, and ad_spend for cost, and imps, views, n, count, and impression_count for impressions are accepted so spreadsheets, query strings, and typed forms can reuse the same contract. Impressions must be strictly positive: if impressions is zero, negative, or at or below a tiny epsilon, the request fails with invalid_input because CPM equals cost divided by impressions times one thousand is undefined when the impression count is zero or negative. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing the thousand-block identity yourself.

Where CPM thinking fits in media buying, reporting, and software

On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result. Pair it with other finance endpoints when you are building a small lab of free, deterministic advertising and unit-economics helpers that stay honest about what they scale.

Dashboard fixtures and interview drills

Seed tests and worksheets with a deterministic cpm equals cost divided by impressions times one thousand so graders and CI never disagree on a hand-computed ratio.

What happens if the number of impressions is zero or negative?

The task fails with invalid_input. CPM is cost divided by impressions times one thousand, which is undefined when the impression count is zero or negative, so the request is not billed.

What does a CPM calculator request cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →