HomeBusiness & Marketing › Ad Metrics Calculator (CPM, CPC, CTR, CPA)

Ad Metrics Calculator (CPM, CPC, CTR, CPA)

Computes the standard paid-advertising metrics cost per mille (CPM), cost per click (CPC), click-through rate (CTR), cost per acquisition (CPA) and click-to-conversion rate from campaign spend, impressions, clicks and conversions.

When to use

You have raw campaign totals (spend, impressions, clicks, optionally conversions) and need CPM, CPC, CTR, CPA or conversion rate, e.g. to compare channels or report performance.

Do not use when: You need revenue-based efficiency (use roas), publisher-side earnings from RPM (use ad-revenue), or conversion rate from site visitors rather than ad clicks (use conversion-rate).

Formula

CPM = spend / impressions × 1000; CPC = spend / clicks; CTR % = clicks / impressions × 100; CPA = spend / conversions; conversion rate % = conversions / clicks × 100

Inputs

ParameterTypeUnitRequiredDescription
spendnumberyesTotal amount spent on the campaign (any currency; outputs use the same currency). Range: ≥ 0, ≤ 1000000000000
impressionsintegeryesNumber of times the ad was shown. Range: > 0, ≤ 10000000000000
clicksintegeryesNumber of clicks on the ad. Range: ≥ 0, ≤ 1000000000000
conversionsintegernoOptional number of conversions (purchases, sign-ups) attributed to the campaign; enables CPA and conversion rate. Range: ≥ 0, ≤ 1000000000000

Outputs

OutputTypeUnitDescription
cpmnumberspend / impressions × 1000.
cpcnumberspend / clicks (absent when clicks = 0).
ctr_percentnumber%clicks / impressions × 100.
cpanumberspend / conversions (only when conversions > 0).
conversion_rate_percentnumber%conversions / clicks × 100 (only when conversions given and clicks > 0).
conversions_per_1000_impressionsnumberconversions / impressions × 1000 (only when conversions given).

Example

Spend 500, 40,000 impressions, 1,000 clicks, 25 conversions: {"spend":500,"impressions":40000,"clicks":1000,"conversions":25}{"cpm":12.5,"cpc":0.5,"ctr_percent":2.5,"cpa":20,"conversion_rate_percent":2.5}

Spend 1,200, 250,000 impressions, 3,000 clicks, 60 conversions: {"spend":1200,"impressions":250000,"clicks":3000,"conversions":60}{"cpm":4.8,"cpc":0.4,"ctr_percent":1.2,"cpa":20,"conversion_rate_percent":2}

GET https://tttkmbb.com/api/v1/calculate/ad-metrics?spend=500&impressions=40000&clicks=1000&conversions=25

Machine access

Sources

FAQ

What does 'mille' in CPM mean?

Latin for thousand: CPM is the cost of 1,000 impressions, so spend / impressions × 1000. A CPM of 12.50 means 1.25 cents per impression.

Is the conversion rate based on clicks or impressions?

On clicks (conversions / clicks), the convention in Google Ads and most ad platforms. Conversions per 1,000 impressions is reported separately.

What if clicks are zero?

CPC and conversion rate are undefined and are omitted; CPM and CTR (0 %) are still returned.

Related calculators