CAC payback is the number of months a new customer has to keep paying before the gross margin on their subscription has covered what it cost to win them. The arithmetic is one division. The hard part is that the three inputs live in three systems that were never designed to agree: the channel a customer came from is in HubSpot, what they pay is in Stripe, and what sales and marketing cost is in Xero and the ad platforms. This template sets out a CAC payback calculation you can defend line by line, both blended and by channel.
The formula, and the decisions hidden inside it
| Measure | Formula |
|---|---|
| Blended CAC | total sales and marketing (S&M) cost in the period ÷ new customers in the period |
| CAC payback (months) | S&M cost ÷ (new MRR × gross margin %) |
| Paid CAC | ad platform spend ÷ new customers whose source is a paid channel |
| Channel payback, direct | channel's own spend ÷ (channel's new MRR × gross margin %) |
| Channel payback, fully loaded | (channel's own spend + its share of shared S&M) ÷ (channel's new MRR × gross margin %) |
Each term needs a written definition before the first number is produced, because each one can move the answer by months.
- New MRR means the monthly recurring revenue of customers whose first paid subscription started in the period. Expansion from existing customers is left out. Upsell is real revenue, but it was mostly won by account management and product, not by the acquisition budget, and counting it flatters payback in exactly the quarters when new sales are weak.
- Gross margin is applied because hosting, support and payment fees come out of every pound of subscription revenue before any of it can repay acquisition cost. Take it from the profit and loss account for the same period, and use one figure for every channel unless you genuinely cost customers differently.
- S&M cost includes salaries, commission and tools, not just advertising. A payback figure built only on ad spend is a paid-media number and should be labelled as one.
- Annual prices are divided by twelve. A customer who prepaid a year has improved your cash, but their MRR is the same as a monthly customer at the same price.
Blended payback tells the board whether the go-to-market engine as a whole is efficient. Paid and per-channel payback tell the marketing lead where the next pound should go. They answer different questions, and a good report shows both side by side rather than choosing one.
The data model
Fields from each system
| Source | Record | Fields used |
|---|---|---|
| HubSpot | Deal | deal ID, Is Closed Won, Close date, create date, Amount, Original Traffic Source and its two drill-downs |
| HubSpot | Contact / company | Email; Company domain name; Original Traffic Source |
| Stripe | Customer | id, email, metadata (where you store the HubSpot company or deal ID) |
| Stripe | Subscription | customer, start_date, status, items (each with a price, price.recurring.interval and quantity) |
| Xero | Profit and loss | revenue, cost of sales, each S&M account, split by tracking category where you use one |
| Google Ads | Campaign metrics | metrics.cost_micros by date |
| LinkedIn Ads | Ad analytics | costInLocalCurrency by date and campaign |
HubSpot's default deal properties include an Original Traffic Source on the deal, copied from the associated contact with the earliest activity, or from the company if no contact is associated. Its traffic source values are fixed: Organic search, Paid search, Email marketing, Organic social, Referrals, AI Referrals, Other campaigns, Direct traffic, Paid social and Offline sources. That fixed list is useful. It means "channel" has the same meaning every quarter, and you map your spend lines onto it rather than inventing a parallel taxonomy.
On the Stripe side, the Subscription object gives you start_date and the line items that make up MRR. The Customer object carries email and a free-form metadata map.
Spend comes from two places. Xero holds salaries, software, agency fees, events and partner commission; its Accounting API exposes a profit and loss report that can be filtered by tracking category, so an "Events" or "Organic" tracking option can carry the channel. Ad spend is better taken from the platforms themselves, because they report it by day and campaign. Google Ads returns cost as metrics.cost_micros, where one million micros is one unit of currency. LinkedIn's ad analytics endpoint returns costInLocalCurrency when you ask for it in the fields parameter. Meta's Insights API returns a spend value per campaign if you run ads there.
The joins
| From | To | Join key | Strength |
|---|---|---|---|
| Stripe customer | HubSpot company or deal | HubSpot ID stored in Stripe metadata |
Exact, if your sign-up or quoting process writes it |
| Stripe customer | HubSpot contact | Stripe email = HubSpot Email |
Exact for the person, but they may not be the contact on the deal |
| Stripe customer | HubSpot company | domain of Stripe email = Company domain name |
Probable; fails on personal addresses |
| Spend line | Channel | Xero tracking option or ad platform | Exact for ad platforms; as good as your coding discipline in Xero |
| Channel | New customers | HubSpot Original Traffic Source on the won deal | Exact once the Stripe link is made |
There is no shared key between Stripe and HubSpot unless you create one. The most reliable fix is to write the HubSpot company or deal ID into Stripe customer metadata when the customer is set up, so every later report joins on it exactly. HubSpot's contacts API lets you look a contact up by email with idProperty=email, which covers most of the rest. Customers who paid with a personal email address and have no stored ID can't be attributed. Keep them in blended CAC, because their acquisition was paid for, and leave them out of every channel row.
Watch for double counting. Google and LinkedIn invoices are usually posted in Xero to an advertising account as well. If you take ad spend from the platforms, exclude that Xero account from the S&M total, or reconcile the two monthly and take one.
The lag between spend and close
A pound spent on a LinkedIn campaign in June may produce a customer in August. Divide August's new MRR by August's spend and you have mixed one cohort's cost with another's revenue. In a quarter where the budget is rising, same-period payback looks worse than the truth; when it falls, it looks better.
The fix is to shift each channel's spend window back by its typical sales cycle. Measure the cycle from the data, not from opinion: take the median number of days from deal creation to Close date for won deals in each channel, round to whole months, and move that channel's spend window back by that many months. Two exceptions are worth writing down. Partner commission is paid when a deal closes, so referral spend is never lagged. Shared costs such as salaries are usually left in the same period, because a sales team works on deals at every stage at once.
New customers · Aug–Oct 2026
CAC payback by channel · Ferrowick Software (fictional)
Blended CAC payback:
12.2 months.
All sales and marketing cost for the quarter, divided by the gross margin on the MRR that 36 new customers started paying. HubSpot gives the channel, Stripe the MRR, Xero the cost and margin.
- Blended CAC
- £7,052
- £253,870 ÷ 36 customers
- Blended payback
- 12.2 mo
- On £20,777 margin MRR
- Paid CAC
- £3,615
- 14 from paid search and social
- Paid payback
- 8.2 mo
- Ad spend only, lag-adjusted
Payback by channel (HubSpot Original Traffic Source)
| Channel | New | New MRR | Direct spend | Direct CAC | Payback, direct | Payback, loaded |
|---|---|---|---|---|---|---|
| Paid searchSpend Jul–Sep · lag 1 mo | 8 | £3,730 | £30,810 | £3,851 | 10.6 mo | 24.5 mo |
| Paid socialSpend Jun–Aug · lag 2 mo | 6 | £4,250 | £19,800 | £3,300 | 6.0 mo | 15.1 mo |
| Organic searchSpend Jul–Sep · lag 1 mo | 6 | £2,910 | £9,530 | £1,588 | 4.2 mo | 17.5 mo |
| ReferralsSpend Aug–Oct · lag 0 mo | 5 | £5,380 | £6,460 | £1,292 | 1.5 mo | 7.5 mo |
| Offline sourcesSpend May–Jul · lag 3 mo | 5 | £7,590 | £16,300 | £3,260 | 2.8 mo | 7.0 mo |
| Direct trafficNo direct spend | 4 | £1,960 | – | – | – | 13.2 mo |
Payback = spend ÷ (new MRR × 77.7% gross margin). “Loaded” adds £170,630 of shared salaries and software, split by each channel’s share of the 34 matched new customers. Gold marks channels slower than the blended figure.
Months to repay acquisition cost
Direct spend only Fully loaded
Stripe to HubSpot match
- Matched on HubSpot ID stored in Stripe metadata25
- Matched on email domain = company domain9
- Unmatched, personal email (£920 MRR, blended only)2
- Won in HubSpot, not billing yet (D-58893)1
What the lag changes
- Paid social: 7.3 months on same-quarter spend, 6.0 on spend shifted back 2 months.
- Offline sources: 2.0 months on same-quarter spend, 2.8 on spend shifted back 3 months.
Worked example (illustrative, fictional)
Ferrowick Software is a fictional B2B SaaS business. It reports CAC payback for new customers whose first Stripe subscription started between 1 August and 31 October 2026. All figures are in GBP and invented.
Gross margin. Xero shows revenue of £611,840 and cost of sales of £136,410 for the quarter. Gross margin = (611,840 − 136,410) ÷ 611,840 = 77.7%.
New MRR. 36 customers started paying, with combined MRR of £26,740 (annual prices divided by twelve). Margin-adjusted new MRR = 26,740 × 0.777 = £20,777 a month.
S&M cost for the quarter:
| Line | Source | Aug–Oct |
|---|---|---|
| Sales salaries and commission | Xero | £114,330 |
| Marketing salaries | Xero | £49,060 |
| Marketing software | Xero | £7,240 |
| Paid search | Google Ads | £31,090 |
| Paid social | LinkedIn Ads | £24,200 |
| Content agency (Organic) | Xero, tracked | £9,590 |
| Events and sponsorship (Offline sources) | Xero, tracked | £11,900 |
| Partner commission (Referrals) | Xero, tracked | £6,460 |
| Total | £253,870 |
Blended. CAC = 253,870 ÷ 36 = £7,052. Payback = 253,870 ÷ 20,777 = 12.2 months.
Paid, lag-adjusted. Paid search deals took a median of 27 days to close, so its spend window moves back one month to July–September: £10,210 + £10,110 + £10,490 = £30,810. Paid social took a median of 70.5 days, so its window moves back two months to June–August: £5,900 + £6,600 + £7,300 = £19,800. Paid spend = £50,610 across 14 customers, so paid CAC = £3,615. Their new MRR was £3,730 + £4,250 = £7,980, worth 7,980 × 0.777 = £6,200 a month in margin. Paid payback = 50,610 ÷ 6,200 = 8.2 months.
One channel in full: paid social. Six customers, £4,250 new MRR, £3,302 a month in margin.
- Same-quarter spend: 24,200 ÷ 3,302 = 7.3 months.
- Lag-adjusted spend: 19,800 ÷ 3,302 = 6.0 months.
- Fully loaded: shared costs of £170,630 split across the 34 customers that could be matched to a channel gives paid social 170,630 × 6 ÷ 34 = £30,111. (19,800 + 30,111) ÷ 3,302 = 15.1 months.
The lag works in the other direction for events. A £12,400 trade show in May sits in the May–July window for Offline sources, giving £16,300 of lag-adjusted spend against £11,900 in the same quarter, so payback rises from 2.0 to 2.8 months once spend and customers are lined up.
Reconciliation. The six channel rows hold £25,820 of new MRR. The two customers with personal email addresses and no stored HubSpot ID add £920, which brings the total back to £26,740. They are in the blended figure and in no channel row. One deal closed-won in HubSpot on 27 October has a subscription starting in November, so it is not a new customer in this quarter at all.
Reading the result
Two numbers in the example look contradictory and are both right. Paid social repays its own ad spend in six months, yet takes over fifteen months once it carries a share of the sales team. That is the normal shape for a business where people cost more than media. The direct figure answers "should we spend another pound on LinkedIn?", the loaded figure answers "can this channel carry the business?", and blended payback answers "is acquisition as a whole affordable?".
Allocating shared costs by customer count is a choice, and a crude one. Some teams split sales salaries by deals worked, or by time recorded in the CRM. Whatever basis you pick, state it in the report and keep it stable, or quarter-on-quarter changes will be caused by the method rather than the market.
How to automate it with IVP.ai
The IVP.ai Data Layer pulls won deals and traffic sources from HubSpot, customers and subscriptions from Stripe, the profit and loss by tracking category from Xero, and daily cost from the ad platforms you use. It keeps the Stripe-to-HubSpot mapping as a maintained table, marks each match as stored ID, email or domain, and recalculates channel lags from the deal history each month, so the spend windows move when your sales cycle does.
A Deskless by IVP.ai agent can then check the inputs before anyone reads the output: Stripe customers with no HubSpot link, closed-won deals with no subscription after a set number of days, and ad invoices that also appear in the Xero advertising account. By default it flags these and waits for a person. It doesn't edit records in either system unless you configure it to. More on how Deskless works.
CAC payback is one line of the SaaS board pack; the retention side of the same customers is covered in the NRR calculation template, and the HubSpot pipeline coverage report looks at the deals still open. All templates for this cluster are on the SaaS reporting hub. A fintech using the same approach saved over £120,000 compared with building the data platform in-house; the case study explains how.
To run this report or agent on your own HubSpot, Stripe and Xero data, start with the free 48-hour build. We connect up to three sources, clean the data and set one report or agent running within 48 hours of read-only access. You then have 14 days of access to choose a plan or walk away.