How to Calculate Cost Per Acquisition: Formulas, Refunds, Windows and Partner Payouts

To calculate cost per acquisition, divide the cost of a channel or campaign by the acquisitions it produced in the same cohort: CPA = cost / acquisitions. Then correct it: include fees and payouts, remove refunded or duplicate orders, fix one attribution window, and report channel, blended and marginal CPA separately.

The base formula and the five choices to fix first

CPA = total cost / number of acquisitions.

Before entering a number, write down:

  1. Event. First paid order, trial, demo, or lead. A paid order is used throughout this page.
  2. Cost scope. Media only, or media plus agency, tools, creative and payouts.
  3. Window. How long after the click an order still counts, and whether orders are dated by click or by purchase.
  4. Refund rule. Gross orders, or orders that survive a set period.
  5. Source of truth. Your billing records, with the platform count as a cross-check.

Change any one of these and the CPA changes with no change in performance. The underlying concept is covered in what cost per acquisition means. All figures below are illustrative.

Worked example: gross, net and blended

One month, three sources:

  • Paid search: $24,000 media + $6,000 agency fee = $30,000; 150 orders.
  • Partners: $150 commission x 60 orders = $9,000, plus $3,000 for software and management time = $12,000; 60 orders.
  • Organic and direct: 40 orders, no direct cost assigned.

Gross channel CPA. Search: 30,000 / 150 = $200. Partners: 12,000 / 60 = $200. Identical on a dashboard.

Net channel CPA. Suppose 18 search orders and 3 partner orders are refunded. The search money is spent, so the denominator falls alone: 30,000 / 132 = $227.27. Partner commissions on the 3 refunded orders are reversed before payment, a saving of $450: 11,550 / 57 = $202.63.

Blended CPA. All cost over all orders, net: 41,550 / (132 + 57 + 40) = 41,550 / 229 = $181.44. It is lower than either channel because organic orders carry no cost here. Use it to watch the whole business, never to set a channel budget.

The reversal only works if the refund arrives before the commission locks. If refunds are allowed for 60 days and commissions lock at 30, the later refunds cost you the commission too.

Marginal CPA: the cost of the next customer

Marginal CPA = change in cost / change in acquisitions.

Next month search spend rises from $30,000 to $36,000 and gross orders from 150 to 162. Average CPA moves from $200 to 36,000 / 162 = $222.22, which looks tolerable. The additional 12 orders cost 6,000 / 12 = $500 each.

Average CPA describes money already spent. Marginal CPA is the one to compare with what a customer is worth before adding budget. It is noisy, so use periods long enough to collect a meaningful number of orders, avoid months with promotions, and treat a single step as a hint instead of proof. A holdout, where spend is switched off in some regions, is a stronger test because it also removes customers who would have bought anyway.

Attribution window and cohort timing

The same $30,000 can produce three CPAs. If 96 orders arrive within 7 days of the click, 150 within 30 days and 168 within 90 days, CPA is $312.50, $200.00 or $178.57.

Two rules keep this honest. Use one window for every channel you compare, and state it. Google Ads Help, read in November 2026, lists default conversion windows of 30 days for clicks, 3 days for engaged views and 1 day for view-through, so a Google figure and a 90-day partner figure are not like for like until one is adjusted.

Let the cohort finish. Last week's spend divided by last week's orders overstates CPA when customers take three weeks to decide. Date orders back to the click, and report only months old enough for the window to have closed. Google also says modeled conversions can take up to 5 days to stabilise, so even same-month numbers move.

Adding up platform claims is the other trap. If search claims 150 orders, partners 60 and social 30 on 200 real orders, the 40 extra are double counting, and every channel CPA is understated.

Partner, affiliate and referral CPA

Partner CPA = (commissions + bonuses + reward credits + network or software fees + team time - reversals) / net partner-sourced customers.

Three details change the answer:

  • Percentage commission. Use commission actually earned, not the rate times list price, since discounts lower both.
  • Recurring commission. For year-one CPA, include expected payments for the months covered, allowing for churn. For lifetime CPA, include them all. Label which.
  • Network override. Some networks charge on top of the commission; it belongs in cost.

A referral reward paid to both sides counts twice: a $50 reward to the referrer plus $50 credit to the new customer is $100 of cost, or the gross-margin cost of the credit if you track it that way.

HyypeFi, whose site this is, keeps referral codes bound to the customer from signup and records each revenue action on one ledger that payouts read from, which supplies both halves of this fraction. The same sum can be done in a spreadsheet from a billing export with a source column.

Spreadsheet formulas and common errors

Assume a Costs sheet (A channel, B month, C amount) and an Orders sheet (A order id, B channel, C click month, D status).

  • Net CPA for a channel and month (channel in A2, month in B2): =IFERROR(SUMIFS(Costs!C:C,Costs!A:A,A2,Costs!B:B,B2)/COUNTIFS(Orders!B:B,A2,Orders!C:C,B2,Orders!D:D,"paid"),"no orders")
  • Blended CPA for a month: =SUMIFS(Costs!C:C,Costs!B:B,B2)/COUNTIFS(Orders!C:C,B2,Orders!D:D,"paid")
  • Marginal CPA (cost in C, orders in D, consecutive rows): =IFERROR((C3-C2)/(D3-D2),"n/a")

Errors to look for. Averaging ratios: campaigns at $50 (200 orders, $10,000) and $250 (20 orders, $5,000) do not average $150; the CPA is 15,000 / 220 = $68.18. Counting repeat orders as acquisitions. Leaving out fees. Reading a zero-order channel as a zero CPA. Comparing a lead CPA with an order CPA. Trusting a marginal figure when orders fell, where the sign flips and the ratio means little.

Once the number is right, reducing it is a separate job.

Frequently asked questions

What is the formula for cost per acquisition?
Cost per acquisition equals total cost divided by the number of acquisitions. A $30,000 campaign that produced 150 paying orders has a CPA of $200. For a net figure, subtract reversed payouts from cost and refunded or duplicate orders from the count. For paid clicks it also equals cost per click divided by conversion rate.
Should refunds be included in CPA?
Yes, if the acquisition is meant to be a real customer. Remove refunded orders from the denominator after a set period, such as your refund window. Keep ad cost unchanged, because the platform does not return it. For partners, subtract commissions that were reversed. Report gross CPA as an early signal and net CPA as the final figure.
What is the difference between CPA and marginal CPA?
CPA is an average over everything spent. Marginal CPA is the cost of the most recent additional customers: the increase in cost divided by the increase in acquisitions. In the example here the average is $222 while the additional orders cost $500 each. Use marginal CPA for decisions about adding or cutting budget.
How is CPA calculated in affiliate marketing?
Add commissions, bonuses, network or software fees and the team time spent on the program, subtract reversed commissions, and divide by the customers partners brought who were not refunded. The commission alone understates the cost. State whether recurring commission is counted for the first year or for the customer's whole life.