EnableYourData.com

KPI · Marketing

Cost per click (CPC): formula and example.

Cost per click (CPC) is your ad spend divided by the number of clicks. With most search ads you pay per click, so CPC directly determines how many visitors your budget buys. It is most useful alongside conversion rate: together they determine your cost per acquisition.

Cost per click (CPC) formula

Ad spend ÷ number of clicks

Worked example

In September, Acme Groothandel paid €4,800 for a Google Ads campaign that generated 6,000 clicks. The average CPC is €4,800 ÷ 6,000 = €0.80.

Fictitious figures for Acme Groothandel, a sample wholesaler.

How to read this KPI

A lower CPC means more visitors for the same budget. CPC depends on competition for a keyword, the quality of your ad and your bidding strategy. Compare CPC by keyword and campaign, and always look at conversion rate too: a more expensive click that converts more often can be cheaper overall.

Pitfalls with cost per click (CPC)

  • Chasing the lowest possible CPC, while cheap clicks often bring less relevant traffic.
  • Confusing average CPC with the maximum bid you set.
  • Averaging campaign CPCs instead of dividing total spend by total clicks.

SQL & DAX

Calculating cost per click (CPC) 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, campaign,
       SUM(cost) AS cost,
       SUM(clicks) AS clicks,
       ROUND(SUM(cost) / NULLIF(SUM(clicks), 0), 2) AS cpc
FROM ad_spend
GROUP BY 1, 2, 3
ORDER BY 1, cpc DESC;
DAX · Power BI
CPC =
DIVIDE(
    SUM(AdSpend[Cost]),
    SUM(AdSpend[Clicks])
)

In ENABLE

Tracking this KPI in ENABLE

Plain-language questions

Ask for cost per click (CPC) 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 cost per click?

Divide ad spend by the number of clicks. With €4,800 in spend and 6,000 clicks, the average CPC is €0.80. Ad platforms usually show this figure already, but across several platforms you calculate it yourself.

What is the difference between CPC and CPM?

With CPC you pay or measure per click, with CPM per 1,000 impressions. CPC suits campaigns aimed at visits and conversions, CPM campaigns aimed at reach. Using CTR, you can convert one into the other: CPC = CPM ÷ (1,000 × CTR).

How can you lower your cost per click?

You lower cost per click by making ads and landing pages more relevant and by being more selective about which keywords you bid on. In Google Ads, a higher Quality Score often improves your position at a lower price. Exclude keywords that generate clicks but no customers.

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.