Most SaaS companies rely on blended gross margins and miss which customers are actually profitable. Learn how cost allocation across customers, products, and segments helps finance teams uncover hidden margin erosion and make better pricing decisions.
Most SaaS leaders believe they understand their profitability because they know their gross margin. They know the company average. What that number almost never reveals is which customers are quietly eroding it.
When costs are allocated properly — by customer, by segment, by product line — the distribution is almost always more skewed than expected. Your largest account by ARR is often your least profitable. Your quietest SMB customer may be running at 85%+ gross margin. The product feature you built to win deals may be costing more than it contributes.
A single blended margin hides all of this — including the way high-revenue customers can quietly subsidize less profitable ones.
What Is Cost Allocation in Software Companies?
Cost allocation is the process companies use to allocate costs — including cloud infrastructure, customer support, vendor tools, AI compute, and overhead — to the specific customers, segments, or product lines that generate them.
Without it, these costs pool into a single line on the P&L. Finance sees a company-wide margin. Sales closes the next deal. And nobody knows whether that deal will run at 75% margin or 45%.
Cost allocation is the operational foundation for:
- Gross margin analysis by customer tier or segment
- Accurate cost-to-serve modeling
- Unit economics that hold up under investor scrutiny
- Pricing decisions grounded in real data
- Financial due diligence preparation
SaaS investors and acquirers routinely request customer-level economics during diligence. Companies that can’t produce it are at a disadvantage — and the expectation is becoming standard, not exceptional.
The Hidden Margin Gap
A software company running at 72% gross margin feels healthy. Industry benchmarks put the target range at 70–80% for well-run SaaS businesses (1). No alarm bells ring.
But inside that 72% might be an enterprise segment running at 52% and a self-serve segment at 91%. The average looks fine. The enterprise business does not.
What changes when you see this? Almost everything.
The next pricing conversation with that enterprise account looks different. The CSM coverage model looks different. The decision about whether to build the custom integration a new prospect is requesting looks very different when you know what that support burden will actually cost.
The gap between a company’s highest-revenue customers and its most profitable ones is almost always larger than expected. That gap only becomes visible — and actionable — once you have a real cost-to-serve picture by customer. For many SaaS operators, starting with a customer profit map is where the biggest profitability surprises first surface — a process that begins with getting a clear cost-to-serve view by segment.
The Five Cost Categories to Allocate
Most companies systematically undercount at least two of these.
Infrastructure & Cloud
Hosting, compute (AWS, GCP, Azure), databases, storage, and observability. Cloud costs typically represent 20–30% of SaaS revenue. Leaving them unallocated isn’t a simplification — it’s a material blind spot.
Customer Support & Customer Success
Salaries, tooling (Intercom, Zendesk), and training. Support in North America runs $15+ per ticket. An account that contacts your team twice a month looks very different in a margin model than one that’s essentially self-sufficient.
Third-Party & Vendor Costs
Payment processing fees, messaging APIs, data enrichment licenses. These are per-transaction or per-seat and highly traceable. Easy to undercount because they don’t appear as headcount or a single large invoice.
Artificial Intelligence (AI) Compute
The newest category — and the one catching the most finance teams off guard. AI has introduced usage-based cost models that can move per-customer margin significantly in either direction.
AI embedded in your product and AI used for internal operations need to be tracked separately. In practice, a single account that relies heavily on AI-powered features can generate 3–5x the infrastructure cost of a comparable account that doesn’t. Without customer-level visibility, you’re pricing AI features on assumptions — a risk that compounds as usage grows.
Operational Overhead
G&A, finance, and HR. The hardest to allocate directly. Typically apportioned as a percentage of revenue or headcount across segments.
A Step-by-Step Cost Allocation Framework
Step 1 — Define What You’re Allocating To
Choose your allocation objects: individual customers, tiers (SMB, Mid-Market, Enterprise), or product lines. Start with the dimension most relevant to your next decision — usually the segment where you have the most pricing leverage or the most strategic uncertainty. Don’t try to do everything at once.
Step 2 — Match Costs to Activity Drivers
The core principle of Activity-Based Costing (ABC): costs should follow the activities that cause them, not the revenue that accompanies them.
Revenue-based allocation feels intuitive. In practice, it systematically over-credits low-usage customers and under-charges high-consumption ones — the opposite of what you need to know.
| Cost Type | Recommended Allocation Driver |
| Cloud compute | CPU hours / API calls / active users |
| Cloud storage | GB stored per customer |
| Customer support | Tickets opened / support hours logged |
| Customer success | CSM hours per account |
| Third-party APIs | Transactions or API calls |
| AI compute | Tokens consumed / API calls |
| G&A overhead | % of revenue or headcount |
Step 3 — Calculate Unit Rates
Unit Rate = Total Cost ÷ Total Volume of Driver
If support costs $120,000/year across 8,000 tickets, your cost per ticket is $15.00. Apply this rate across each cost bucket. The math is simple. The discipline is in knowing actual volumes by customer — which is where most companies hit friction without the right systems in place.
Step 4 — Build Your Profitability View
Aggregate allocated costs per customer or segment to reveal true gross margin:
| Customer | ARR | Total Allocated Cost | Gross Margin |
| Acme Co. | $48,000 | $11,400 | 76% |
| Beta Inc. | $12,000 | $1,800 | 85% |
| Gamma LLC | $60,000 | $26,100 | 57% |
Gamma LLC — your largest customer by ARR — is your least profitable. This pattern is common. It’s also a conversation worth having before the next renewal.
Three Mistakes That Undermine Cost Allocation
Allocating everything by revenue. It makes the model feel rigorous while producing systematically misleading results. Revenue-based allocation is the most reliable way to draw the wrong conclusions from accurate data.
Ignoring shared infrastructure. Cloud and AI compute often represent 25–35% of revenue in aggregate. These are your most usage-variable costs. Leaving them unallocated doesn’t simplify your model — it guarantees the model is wrong where it matters most.
Treating it as a one-time project. Allocate Costs shift. Products evolve. Customer behavior changes. Review your model quarterly and rebuild it at least annually. For companies approaching a fundraise or acquisition, a monthly cadence is worth the investment.
What You Can Do With the Data
Once you know a customer is running at 55% gross margin against a company target of 75%, the strategic options become concrete:
- Reprice the account based on actual cost-to-serve
- Right-size CS coverage to reflect real account economics
- Decide deliberately whether to keep acquiring similar customers at current unit economics
- Restructure product packaging before those costs compound across the base
One pattern that surfaces consistently: blended company margins sit within a reasonable range while individual segment numbers tell a very different story. Knowing what healthy looks like at the segment level — and whether you’re inside or outside that range by tier — is the context that finally aligns finance, CS, and sales around the same set of facts.
The Bottom Line
Cost allocation is not an accounting exercise. It’s how profitable SaaS companies make better decisions than their competitors — on pricing, on customer acquisition, on where to invest, and on what to stop doing.
Start with your largest allocat cost bucket and the segment where you need clarity most. Once you have a working model for one area, the others follow. The first time you see per-customer gross margin clearly, the question of where to focus tends to answer itself.
Brad Perry is the CEO of Cogs’z, a profitability management platform built for B2B SaaS companies. Brad co-founded DealerSocket, an end-to-end platform in the automotive industry, where he experienced firsthand the margin challenges that Cogs’z is designed to solve. Cogs’z automates customer-level cost allocation so finance, CS, and sales teams share a single, accurate, view of who’s profitable and why. Learn more or request a demo at cogsz.com.
References
1. SaaS Capital — Annual SaaS Gross Margin Benchmarks