Sign in

Blog · Finance metrics and formulas

Ecommerce Customer Acquisition Cost: Formula and Inputs

Calculate ecommerce customer acquisition cost from distinct first-time buyers and fully loaded acquisition spending. Work through channel costs, buyer exclusions, refunds and the first-order gross profit check.

The short answerEcommerce customer acquisition cost is acquisition spending divided by distinct new buyers acquired on the same measurement basis. Include acquisition media, agency, creative and allocated staff costs in a fully loaded measure. Identify first-time buyers from order history, exclude voided or invalid purchases consistently, and compare CAC with first-order gross profit after discounts, refunds and related cost adjustments.

CAC e-commerce calculations divide acquisition spending by distinct new buyers, using the same reporting scope for both. A fully loaded result includes the people and campaign costs needed to acquire those buyers. To judge the economics, compare that cost with first-order gross profit after discounts and refunds.

The ecommerce CAC formula

Ecommerce CAC = (Acquisition media + Agency + Creative + Allocated staff spending) / Distinct new buyers acquired

First-order gross profit per new buyer = (First-order net revenue - Related net COGS) / Distinct new buyers acquired

Use parentheses around the complete cost sum when entering the first formula in a spreadsheet. The second measure is a comparison with CAC, not part of its denominator. Gross profit can be positive while acquisition spending remains unrecovered.

The general customer acquisition cost guide covers the broader formula. Ecommerce adds a practical identity problem: new orders are easy to count, but new people must be separated from existing buyers, invalid orders and duplicate customer records.

Agree on the spending scope before the month closes. A media-only figure is useful for a campaign view, but label it that way. The SBA's marketing and sales guidance recommends a complete cost breakdown, continued cost tracking and consistent measurement. Those practices make a channel comparison reproducible.

The export rows behind the calculation

Start with acquisition expense records for the reporting month. Keep channel, expense date, vendor category, amount, acquisition share and allocation basis. Retention-only campaigns are outside this example. If an employee works on acquisition and retention, use the acquisition share of that person's cost rather than the entire salary.

Next, use order and customer exports with a stable customer ID, order ID, order status, order date, prior purchase history and assigned acquisition channel. The first-order financial fields are sales before discounts, discounts, refunds and net COGS after return adjustments. Exclude sales tax from sales.

Create one acquired-buyer list before grouping by channel. A buyer attributed to search and social in separate reports must still appear only once in the company denominator. Use one documented assignment policy and retain an unassigned group if the files cannot support a channel decision.

An observed attribution is not proof that the channel caused the purchase. Keep a separate test of incremental sales when deciding whether an additional budget increase is worthwhile.

Worked example: two acquisition channels

A US accessories retailer reviews one month's acquisition activity. Its approved policy includes acquisition media, agency, staff allocation and creative costs. The dollar amounts below are the expenses assigned to each channel after the monthly close.

Channel Media (USD) Agency (USD) Staff allocation (USD) Creative (USD) Total acquisition cost (USD)
Search 18,000 3,000 4,500 1,500 27,000
Social 12,000 2,000 3,000 1,000 18,000
Total 30,000 5,000 7,500 2,500 45,000

Search costs 18,000 + 3,000 + 4,500 + 1,500 = $27,000. Social costs 12,000 + 2,000 + 3,000 + 1,000 = $18,000. Their sum must match the acquisition expense schedule, not the larger marketing budget if that includes retention spending.

The candidate buyer export then needs two exclusions. The categories below are mutually exclusive; the voided or invalid group does not contain any buyer already removed as an existing customer.

Channel Candidate buyer IDs Existing buyers found in history Voided or invalid buyers Valid new buyers CAC (USD)
Search 600 80 20 500 54.00
Social 500 70 30 400 45.00
Total 1,100 150 50 900 50.00

Search has 600 - 80 - 20 = 500 new buyers. Its CAC is 27,000 / 500 = $54.00. Social has 500 - 70 - 30 = 400 new buyers, so CAC is 18,000 / 400 = $45.00. Company CAC is 45,000 / 900 = $50.00.

For a sheet with total spending in F2 and valid buyers in J2, use =F2/J2. Flag a zero buyer count for review rather than replacing an undefined CAC with zero. Currency values in this example are displayed to cents.

Compare CAC with first-order gross profit

Keep all genuine acquired buyers in the original cohort, including buyers whose completed orders were later returned. This example excludes cancellations before completion, while subsequent refunds reduce cohort revenue. That rule prevents a disappointing acquisition from disappearing from the buyer count.

The first completed orders produce these amounts after the retailer's return review:

Channel Sales before discounts (USD) Discounts (USD) Refunds (USD) Net revenue (USD) Net COGS (USD) Gross profit (USD)
Search 65,000 5,000 6,000 54,000 28,000 26,000
Social 48,000 4,000 8,000 36,000 18,000 18,000
Total 113,000 9,000 14,000 90,000 46,000 44,000

Net revenue is sales less discounts and refunds. Gross profit is net revenue less net COGS. IRS Publication 334 describes the underlying bridge from gross receipts through returns and allowances to net receipts, and then through COGS to gross profit.

Search first-order gross profit per buyer is 26,000 / 500 = $52.00 against CAC of $54.00. Social earns 18,000 / 400 = $45.00 against CAC of $45.00. Company gross profit per new buyer is 44,000 / 900 = $48.89, below the $50.00 acquisition cost.

The combined first-order gross profit less acquisition spending is 44,000 - 45,000 = -$1,000. This is before any additional fulfillment, payment, support or corporate costs outside COGS. Social matching CAC at the gross-profit level does not establish net profitability.

The checks that prove the result

First, reconstruct total acquisition spending from the channel CACs and buyer counts: 54 × 500 + 45 × 400 = $45,000. The simple channel average is (54 + 45) / 2 = $49.50, which fails because it gives different buyer counts equal weight.

Second, reconcile the buyer bridge: 1,100 - 150 - 50 = 900. Every valid buyer must have a qualifying first completed order and no earlier completed purchase in the available history. Investigate missing older history before asserting that the buyer is new.

Third, reconcile first-order gross profit: 113,000 - 9,000 - 14,000 - 46,000 = $44,000. Refund records need the original order or buyer ID so later credits remain attached to the right cohort. Retain the report's cutoff date because further returns can change the economics.

Finance owns these ties; marketing owns the acquisition assignments and expense allocations. Compare channels only after both owners agree on the scope. For external comparisons, use the separate average ecommerce CAC guide; for repeat purchases, move to the ecommerce LTV to CAC ratio.

Where it goes wrong

  • Counting first orders in a short export. A customer's first order in this month's file may follow purchases in prior months.
  • Double-counting promotions. Subtract checkout discounts from revenue once; do not also charge them as acquisition costs in the same profit bridge.
  • Dropping returned buyers. Genuine acquisitions remain in the cohort while their refunds reduce the economic result.
  • Overlapping channel reports. Deduplicate company buyers before allocating them to mutually exclusive channels.
  • Calling gross-profit recovery payback. A complete unit economics review also considers the variable costs required to serve the customer.

Check your ecommerce acquisition file in Covirage

Bring a sample of your own order history, refund records and acquisition expense export to Covirage. Covirage maps the columns, and its tools compute and check the channel and company figures; the external AI model explains the results with every figure traced to its rows. Create a free Covirage account, which takes about a minute, then set up your business and bring your files.

See customer profitability for the wider view of acquisition costs and the economics of serving each buyer group.

Questions people ask

Does ecommerce CAC include discounts?

Record a checkout discount as a reduction of order revenue in the first-order economics. Do not add that same amount to acquisition spending and subtract it from revenue again in the combined profit check. Distinct promotional expenses, such as acquisition campaign fees, belong in the appropriate cost category.

Should I calculate CAC per order or per customer?

Use distinct new customers for CAC. One buyer can place several orders during the reporting period, but the later orders do not represent additional acquisitions. If you also track cost per order, label it separately and explain whether its denominator includes repeat orders, canceled orders or both.

How should shared marketing costs be allocated?

Choose a documented basis that reflects the acquisition work, such as recorded staff time or an agreed campaign allocation. Keep the full shared expense tied to the ledger and make sure its channel allocations add back to that amount. Apply the same method when comparing successive periods.