CAC by channel: how to calculate customer acquisition cost by channel
By Devendra Variya, co-founder of Virling. Published 2026-11-20, updated 2026-11-30.
To calculate CAC by channel, divide what you spent on a channel in a period by the new paying customers that channel brought in the same period. The spend is easy: it is in your ad accounts and invoices. The customer count is the hard part. You need to know which visits turned into paying customers, not only clicks or signups, which means joining each payment to the visit that came before it and counting the customers each channel won.
This post covers the formula, why the customer count per channel goes wrong, and how to get paying customers per channel from Virling, so you can divide your own spend by it.
The formula
CAC for a channel = spend on that channel in the period / new paying customers from that channel in the period
- Spend is everything you paid to run the channel: ad spend, sponsorship fees, freelancers, and the tools only that channel uses. Shared costs such as salaries go into blended CAC instead.
- New paying customers are people whose first payment fell in the period and was credited to the channel. Signups, trials and free accounts do not count until they pay.
- Blended CAC is all acquisition costs divided by all new paying customers. It tells you what a customer costs on average, but not which channel to cut or grow.
The CAC calculator works out blended and per-channel CAC from the numbers you type, and the CAC payback calculator shows how many months a customer takes to earn their CAC back. Acquisition spend also comes out of your margin, so for the business as a whole, check your Rule of 40 score: revenue growth plus EBITDA or free cash flow margin.
Why the customer count per channel is the hard part
- Clicks and signups are not customers. A channel can send hundreds of signups who never pay. Divide spend by signups and that channel looks cheap. Conversion rate by traffic source counts payments instead.
- Ad platforms count their own conversions. Each reports the conversions it saw, with its own window, so two platforms can both claim the same buyer and the totals add up to more customers than you have.
- Payments do not know the visit. Your payment provider knows the customer, not the link they clicked. Without a join between the two, you are guessing which channel each customer came from.
- Untagged clicks land in Direct. Links opened in apps and emails often arrive with no referrer. Untagged, those customers count as Direct and the channel that paid for them looks more expensive than it is.
- Renewals are not new customers. A month-six renewal is the same customer, so counting payments instead of customers makes CAC look lower than it is.
Set up Virling to count customers per channel
- Tag every link you pay for or control. Use
utm_sourcefor the place, such asgoogle,linkedinornewsletter, andutm_campaignfor the campaign. For paid clicks setutm_medium=cpc(orppc,paid,paidsocial), so they land in the Paid channel. For emails setutm_medium=emailornewsletter. For organic posts use any other medium, such associal. The UTM builder makes the link, and tracked links give you a short link with the tags added. The rules are in channels. - Add the script. Paste the tag from your site's setup page before
</head>on every page of your site and app. It sets the first-partyvirling_vidcookie that links a payment to the visits before it. See add the script. - Connect your payment provider. Open your site's payments setup and connect Stripe, Paddle, Polar, Lemon Squeezy, Dodo Payments, Creem, RevenueCat, Shopify or WooCommerce. Virling reads payments only: it never creates, changes or refunds anything. Each provider has its own page under integrations, and the keys are listed in payments.
- Pass the visitor ID into checkout. Stripe Payment Links, Polar, Dodo Payments and Lemon Squeezy checkout links need nothing: the script adds the ID on click. For a checkout you create on your server, pass the
virling_vidcookie, for example asclient_reference_idon a Stripe Checkout Session. See link checkout to visits.
Count paying customers per channel
Virling joins each payment to the visit before it, so you see how many paying customers every channel brought. Self-host it free, or use the hosted version with a 14-day free trial.
Read paying customers per channel
- Pick the same range your spend covers, such as last month.
- Open the Retention page. It groups customers by the channel, referrer and campaign credited for their first payment, and Customers acquired counts those whose first payment is in the range. That is the number to divide by.
- Divide each channel's spend for the range by its customers acquired. That is your CAC per channel.
- Use the same page for the other side of the ratio: Avg LTV is what those customers have paid so far, net of refunds, and 30-day churn shows whether they stay. See retention by channel.
Spend is never imported. If you type your monthly spend per channel into Site settings, under Monthly spend per channel, a Profit by channel card shows each channel's spend, revenue, profit and return per dollar for the range. Nothing connects to an ad platform, so the numbers are only as good as the amounts you type. The formula is in profit by marketing channel.
By default a payment is credited to the latest visit in the last 90 days that was not Direct. A buyer who clicked your ad and came back a week later by typing your URL is credited to the ad. For long buying cycles, try first touch to see which channels introduce customers. See model and lookback window.
A worked example
Made-up numbers to show the method, not results from a real business. One month of spend and the customers acquired in that month:
| Channel | Spend | Signups | Paying customers | CAC per signup | CAC per paying customer |
|---|---|---|---|---|---|
| Paid | $3,000 | 300 | 10 | $10 | $300 |
| $200 | 40 | 8 | $5 | $25 | |
| Social | $600 | 60 | 4 | $10 | $150 |
By signups, Paid and Social cost the same. By paying customers, Paid costs twice as much as Social and twelve times as much as Email. Whether $300 is too much depends on what those customers pay and how long they stay, which is what the CAC payback calculator and the LTV to CAC ratio calculator answer. Then work out CAC payback by channel to see how many months each channel takes to earn its CAC back. With counts this small, one customer moves a row a lot, so read a few months before you move budget.
What to check when the numbers look wrong
- A paid channel has spend but almost no customers, and Direct is high. Some ad links are untagged. Add
utm_medium=cpcand autm_sourceto every ad. - Fewer customers than your payment provider shows. Check the Matched revenue line under the Overview numbers. Payments without a visitor ID still count toward revenue, as Unattributed, but not toward a channel. See Unattributed revenue.
- Old customers are missing. A customer whose earliest payment in Virling is a renewal started before the 90-day import, so they are left out of customers acquired.
- A customer counts twice. Customers are matched per provider, so someone who moved from one provider to another counts as two.
- Trials are not in the count. A trial is never counted as a customer. The customer counts when they first pay, and that payment is credited to the visits before the trial.
Frequently asked questions
How do you calculate CAC by channel?
Divide the spend on a channel in a period by the new paying customers that channel brought in the same period. Count customers by their first payment, credited to the visit that came before it, not by signups or clicks.
What is the difference between blended CAC and CAC by channel?
Blended CAC divides all acquisition costs, including salaries and tools, by all new paying customers. CAC by channel divides one channel's spend by the customers that channel brought, so you can compare channels with each other.
Should CAC use signups or paying customers?
Paying customers. Signups count interest, and a channel that sends many signups who never pay looks cheap per signup and expensive per customer.
Does Virling import ad spend?
No. Virling counts paying customers and revenue per channel from your site and payment provider. You enter your own spend, either in a calculator or as monthly spend per channel in Site settings.
How do I count customers from organic channels with no ad spend?
Tag the links you post, such as social posts and newsletters, so those customers are credited to their channel. Their spend is the time and tools the channel takes, which you can price yourself to compare them with paid channels.
See which channels bring paying customers
Virling is open source under AGPL. Self-host it free, or use the hosted version with a 14-day free trial. It connects to Stripe, Paddle, Shopify, WooCommerce, Polar, LemonSqueezy, Dodo, Creem and RevenueCat.