Cost Per Click Calculator Formula

Understand the math behind the cost per click calculator. Each variable explained with a worked example.

Formulas Used

Cost Per Click

cpc = total_clicks > 0 ? total_spend / total_clicks : 0

Clicks Per Dollar

clicks_per_dollar = total_spend > 0 ? total_clicks / total_spend : 0

Variables

VariableDescriptionDefault
total_spendTotal Ad Spend(USD)2000
total_clicksTotal Clicks800

How It Works

How to Calculate Cost Per Click

Formula

CPC = Total Ad Spend / Total Clicks

CPC tells you the price you pay for each visitor acquired through paid advertising. Lower CPC means your budget stretches further, but CPC alone does not determine campaign success. A low CPC with poor conversion rates can still produce a negative return. Always evaluate CPC alongside conversion rate and cost per acquisition.

Worked Example

An ad campaign spent $2,000 and generated 800 clicks.

total_spend = 2000total_clicks = 800
  1. 01CPC = $2,000 / 800 = $2.50
  2. 02Clicks Per Dollar = 800 / $2,000 = 0.40
  3. 03Each click costs $2.50 on average.

Frequently Asked Questions

What is a good CPC?

CPC varies enormously by industry and platform. Google Ads averages $1-$2 for search but can exceed $50 in legal or insurance. Facebook averages $0.50-$2.00. B2B LinkedIn ads often run $5-$10 per click.

How can I lower my CPC?

Improve ad quality scores by writing relevant ad copy, targeting specific keywords, using negative keywords, optimizing landing pages, and testing multiple ad variations. Higher relevance scores earn lower CPCs in auction-based platforms.

Learn More

Guide

Marketing ROI Guide

Learn how to calculate and improve marketing ROI. Covers ROAS, cost per acquisition, cost per lead, attribution models, and channel-level performance analysis.

Ready to run the numbers?

Open Cost Per Click Calculator