Customer acquisition cost (CAC): formula and DAX

How to calculate customer acquisition cost, sales and marketing spend divided by new customers, blended against paid CAC, CAC by channel, the payback period in months, which costs to include, the DAX joining a spend table with new customers, and a chart of CAC by channel.

Short answer: customer acquisition cost (CAC) = sales and marketing spend in a period / new customers won in that period. Blended CAC divides all spend by all new customers (including organic ones); paid CAC divides paid media spend by customers from paid channels only, and is the honest number for deciding ad budgets. CAC payback = CAC / (monthly gross margin per customer): with CAC 240 and 30 a month of margin, a new customer pays back in 8 months.

CAC is the price of growth. Rising CAC with flat lifetime value means each new customer is worth less than it was.

How is it calculated?

ChannelSpendNew customersCAC
Paid search120600200
Paid social90300300
Affiliates30200150
Organic, referral, direct0900
Team and tools (not by channel)60
Blended3002,000150
Paid only2401,100218
Q3 (spend in k)
0100200300300Paid social200Paid search150Affiliates
CAC by paid channel

Blended CAC (150) looks good because 900 customers came at no media cost; paid CAC (218) is what each extra euro of ads buys.

What is the DAX?

A Spend table (Date, Channel, Amount) and the customer table with First Purchase Date and Acquisition Channel. Relate both to the Date and Channel dimensions:

Spend = SUM ( Spend[Amount] )

New Customers =
CALCULATE (
    COUNTROWS ( Customer ),
    USERELATIONSHIP ( Customer[First Purchase Date], 'Date'[Date] )
)

CAC = DIVIDE ( [Spend], [New Customers] )

Paid CAC =
CALCULATE ( [CAC], Channel[Is Paid] = TRUE () )

Active Customers = DISTINCTCOUNT ( Sales[Customer ID] )

Margin per Customer per Month =
DIVIDE ( [Gross Profit], [Active Customers] ) / DISTINCTCOUNT ( 'Date'[Year Month] )

CAC Payback Months = DIVIDE ( [CAC], [Margin per Customer per Month] )

USERELATIONSHIP activates the relationship from first purchase date to the Date table only for this measure (see relationship functions). Spend without a channel (team, tools, agency fees) belongs in blended CAC; put it on an "Overhead" channel so it shows in the total and not in any one channel.

Which costs belong in CAC?

Alwaysmedia spend, agency and affiliate fees, sales commissions on new deals
Usually, in blended CACmarketing and sales salaries, tools, events
Nevercosts of serving existing customers: support, account management, retention offers
What to include

Write the choice into the KPI definition: CAC numbers from different companies are rarely comparable because they include different costs.

What goes wrong?

  • Timing. Spend this month often wins customers next month; for long sales cycles, compare spend with customers one period later, or use a cohort view.
  • Attribution. "Paid social" customers may have found you organically first; CAC per channel is only as good as the attribution behind it.
  • Blended only. It hides how expensive paid growth is.
  • Leaving out sales cost. In B2B, sales salaries are often most of CAC.

Where can you check this?

Where do you start?

Load spend by channel and month, tag each customer's acquisition channel, and show blended and paid CAC side by side. ROAS measures the same spend against revenue.

Keep reading

More from the blog.

Every post

Next

Building this? Say hello.

A question about this post, a pattern you would build differently, or the next thing you want written out: Behnia reads every message.