Home › Business & 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
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
spend | number | yes | Total amount spent on the campaign (any currency; outputs use the same currency). Range: ≥ 0, ≤ 1000000000000 | |
impressions | integer | yes | Number of times the ad was shown. Range: > 0, ≤ 10000000000000 | |
clicks | integer | yes | Number of clicks on the ad. Range: ≥ 0, ≤ 1000000000000 | |
conversions | integer | no | Optional number of conversions (purchases, sign-ups) attributed to the campaign; enables CPA and conversion rate. Range: ≥ 0, ≤ 1000000000000 |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
cpm | number | spend / impressions × 1000. | |
cpc | number | spend / clicks (absent when clicks = 0). | |
ctr_percent | number | % | clicks / impressions × 100. |
cpa | number | spend / conversions (only when conversions > 0). | |
conversion_rate_percent | number | % | conversions / clicks × 100 (only when conversions given and clicks > 0). |
conversions_per_1000_impressions | number | conversions / 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
- API:
GET https://tttkmbb.com/api/v1/calculate/ad-metrics(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/ad-metrics · Markdown: https://tttkmbb.com/business/ad-metrics.md · JSON definition: https://tttkmbb.com/business/ad-metrics.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="ad-metrics" - OpenAPI operationId:
calculate_ad_metrics - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- Google Ads Help – Cost-per-thousand impressions (CPM): Definition (reference)
- Google Ads Help – Clickthrough rate (CTR): Definition (reference)
- Wikipedia – Cost per mille (reference)
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
- ROAS Calculator — Revenue-based return on the same ad spend.
- Conversion Rate Calculator — Conversion rate and required traffic from visitors and conversions.
- Ad Revenue Calculator (RPM) — Publisher-side revenue from RPM and page views.