CPA calculator
Divide what a campaign spent by the acquisitions it brought in: 5000 of ad spend for 25 purchases or leads is a CPA of 200. Set channels, campaigns or last week side by side on one number. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Spend
- 5,000
- Acquisitions
- 25
- Cpa
- 200
Cost per acquisition, often searched as a CPA calculator, is the advertising unit-economics identity that turns a campaign cash outlay into a price per result: total advertising spend divided by the number of acquisitions. Media buyers compare search, social, display, and affiliate flights on that single ratio before they raise or cut a bid. Arithmetic is deterministic, with no network, no sampling, and no clock.
What cost per acquisition tells you
Cost per acquisition is the campaign-level ratio marketers write as CPA equals advertising spend divided by acquisitions. Spend 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, platform serving fees in the same currency. Acquisitions are the results you count as wins in that same window: purchases, qualified leads, trial starts, or app installs, depending on the conversion you bid for.
Dividing those two numbers yields a currency-per-result figure you can set beside a target CPA, a contribution margin, or last week's blended number. This calculator returns the echoed spend and acquisitions you submitted, the cpa result, and the formula string cpa equals spend divided by acquisitions.
Where CPA thinking fits in media buying, reporting, and software
People meet CPA thinking when a media buyer asks whether a search campaign is still cheaper per purchase than a social prospecting ad set, when a founder compares agency retainers that quote a target cost per lead, or when a finance partner asks why last month's blended CPA jumped after a brand burst. Performance teams pre-check whether a proposed daily budget at the current conversion 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 conversion counts before recommendation demos, or to satisfy product-challenge statements that demand a cpa field rather than a hand-waved efficiency claim. Homework and interview practice often needs a fast, offline source of quotients so solutions can be checked without opaque spreadsheet macros under time pressure.
This identity is not a substitute for incrementality tests, geo holdouts, or full customer acquisition cost that includes salaries and software, but it is the number every ad account already prints next to conversions.
What you can do with it
Paid search and social bid checks
Divide last week's ad spend by counted purchases or leads to see whether a campaign still sits under its target CPA before you raise the bid.
Weekly blended CPA reporting
Roll several channels into one spend total and one acquisition total so finance and growth share a single blended cost-per-acquisition figure.
FAQ
How do I calculate CPA from advertising spend and acquisitions?
Send finite numbers spend (non-negative) and acquisitions (strictly positive).
Is this CPA calculator the same as customer acquisition cost (CAC)?
No. This identity uses advertising spend only. CAC typically folds in sales salaries, software, and creative production. Use a dedicated CAC tool if you need that broader cost base.
Can I send fractional conversions reported by an ad platform?
Yes. Acquisitions may be a positive fraction such as attributed conversions of twelve point five. The quotient still uses ordinary floating-point division with stable rounding.
What happens if a campaign has zero acquisitions?
The calculator rejects it, because dividing spend by zero acquisitions gives no cost per acquisition. The acquisition count has to be above zero, while a spend of zero is accepted and simply gives a CPA of zero.
What counts as an acquisition when I calculate CPA?
Any result you count as a win in the same window as the money spent, such as purchases, qualified leads, trial starts or app installs, depending on the conversion you bid for. Keep both figures to the same dates.
Related tools
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/fin/cpa \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"spend":5000,"acquisitions":25}'const res = await fetch("https://api.kit.forhosting.com/fin/cpa", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"spend": 5000,
"acquisitions": 25
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/fin/cpa",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"spend": 5000,
"acquisitions": 25
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/fin/cpa", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"spend":5000,"acquisitions":25}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"spend":5000,"acquisitions":25}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/fin/cpa", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"spend": 5000,
"acquisitions": 25
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "fin.cpa",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_abs_value | 1000000000000000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
This tool accepts spend and acquisitions, returns the cost per acquisition, and fails with invalid_input when the acquisition count is zero because that quotient is undefined. Use it free in the browser, or call the API at $0.002 per successful item for dashboards, bid-check worksheets, and nightly budget scripts that must see the same figure every time.
What cost per acquisition means and what the response contains
There is no hidden tax, currency conversion, multi-touch attribution model, or time-value discount: the engine either divides two finite numbers inside the supported range or rejects the input with invalid_input. Rejected cases include missing spend or acquisitions, non-finite values, magnitudes above the documented ceiling, a negative spend, and any acquisitions value that is zero or non-positive, because division by zero is undefined and a non-positive conversion count does not define a cost per acquisition.
How spend and acquisitions 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 CPA. Zero for spend is valid and simply yields zero cost per acquisition when acquisitions is positive: a campaign that spent nothing and still recorded conversions has a CPA of zero in this identity. Negative spend is also rejected so the model stays an advertising-cost calculator rather than a signed ledger of rebates. The preferred fields are spend for total advertising spend in one currency unit and acquisitions for the number of conversions counted in the same window, but aliases ad_spend, advertising_spend, cost, amount, and total for spend, and conversions, customers, n, count, and acquired for acquisitions are accepted so spreadsheets, query strings, and typed forms can reuse the same contract. Acquisitions must be strictly positive: if acquisitions is zero or at or below a tiny epsilon, the request fails with invalid_input because CPA equals spend divided by acquisitions is undefined when the number of acquisitions is zero. 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 division yourself.
Where CPA 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 divide.
Integration use cases
Dashboard fixtures and interview drills
Seed tests and worksheets with a deterministic cpa equals spend divided by acquisitions so graders and CI never disagree on a hand-computed ratio.
Technical questions
What happens if the number of acquisitions is zero?
The task fails with invalid_input. CPA is spend divided by acquisitions, which is undefined when the acquisition count is zero, so the request is not billed.
What does a CPA 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.