Contribution Margin Formula: Definition and Example
The contribution margin formula is: Contribution Margin = Revenue − Variable Costs. The contribution margin ratio is that result divided by revenue. It shows how much each sale adds toward fixed costs and profit. Fixed costs are excluded because they do not change with volume.
- Contribution Margin = Revenue − Variable Costs; the ratio divides that result by revenue.
- Only variable costs belong in the formula: hosting, payment fees, support, and per-seat third-party licenses.
- Fixed costs like rent, salaried engineers, and insurance are excluded and covered by total contribution.
- In SaaS, COGS is mostly hosting, support, and vendor licenses, so the ratio is often high.
- Use the result for break-even, pricing, and product-mix decisions, not for full profit reporting.
What is contribution margin?
Contribution margin is the money left from a sale after variable costs, available to cover fixed costs and profit. It is expressed in dollars per unit or as a percentage of revenue. It answers one question: how much does each additional sale contribute?
What is the contribution margin formula?
The formula subtracts total variable costs from revenue. The result is the dollar contribution for a product, a customer, or the whole company.
- Contribution Margin = Revenue − Variable Costs
- Contribution Margin Ratio = (Revenue − Variable Costs) ÷ Revenue
- Per-unit Contribution = Price per Unit − Variable Cost per Unit
For SaaS, revenue is subscription and usage fees. Variable costs are the costs that rise with each customer or seat.
Which costs are variable in a SaaS business?
Variable costs are costs that scale with customers, seats, or usage. Everything that stays flat in the short term is fixed.
| Variable (include) | Fixed (exclude) |
|---|---|
| Cloud hosting and storage per customer | Salaried engineering team |
| Payment processing fees | Office rent and utilities |
| Customer support staff that scale with volume | Insurance and legal retainers |
| Third-party per-seat licenses | Core security tooling with flat plans |
| Onboarding costs paid per customer | Executive salaries |
One caution: a cost can be fixed per month but variable per customer. Classify by behavior, not by vendor name.
Recheck your variable cost list each quarter. Hosting contracts and per-seat vendor licenses change, and a stale list distorts every margin number.
Worked example: contribution margin for a SaaS plan
Here is a simple example, with numbers chosen for illustration only. A company sells a plan at $100 per month per customer.
Variable cost per customer per month: - Hosting: $8 - Payment processing: $3 - Support allocation: $10 - Third-party per-seat license: $4
Total variable cost = $25 per customer per month. Contribution margin = $100 − $25 = $75 per customer per month. Contribution margin ratio = $75 ÷ $100 = 75%.
Now scale it. With 400 customers, total contribution = 400 × $75 = $30,000 per month. If fixed costs are $24,000 per month, profit = $30,000 − $24,000 = $6,000.
To find break-even customers, divide fixed costs by contribution per customer: $24,000 ÷ $75 = 320 customers. Run your own numbers with the contribution margin calculator.
What is the difference between contribution margin and gross margin?
Gross margin also subtracts variable costs, but it starts from cost of goods sold as defined by accounting rules. Contribution margin is a management view. Gross margin includes some allocated costs that contribution margin leaves out, such as certain support or infrastructure overhead.
Use contribution margin for decisions inside the business: pricing, discount approval, and which plans to push. Use gross margin for financial statements and investor reporting. Keep both, and document which costs sit in each.
How do you use contribution margin to make decisions?
Contribution margin turns into action when you compare it across plans, segments, and channels. The rules are simple.
- Break-even: fixed costs ÷ contribution per unit = units needed to break even. Try the break-even customers calculator.
- Discount floor: a discount is safe only while contribution stays positive. Check the discounted price against variable cost per customer.
- Product mix: push the plan or segment with the highest contribution per customer, not the highest revenue.
- Channel choice: compare contribution after channel-specific variable costs, such as partner fees or payment rails.
- Customer economics: contribution feeds payback and lifetime value. See the LTV:CAC ratio guide and the CAC payback calculator.
A practical habit: review contribution margin by plan each month. When a plan falls below target, fix the variable cost line or raise the price.
What are the most common contribution margin mistakes?
Most errors come from mixing fixed costs into variable costs, or the reverse. These are the frequent ones.
-
Counting salaried staff as variable. Salaries do not move with each sale in the short term. Keep them fixed.
-
Leaving out payment fees. Card processing of roughly 2–3% is a common rule of thumb and belongs in variable costs.
-
Ignoring per-seat vendor licenses. These scale with seats and must be included.
-
Using revenue instead of net revenue. Deduct discounts and refunds before calculating.
-
Mixing time periods. Match one month of revenue with one month of variable costs.
-
Treating the ratio as profit. Contribution margin covers fixed costs first. Profit is what remains after that.
How does contribution margin connect to SaaS metrics?
Contribution margin is an input to most SaaS unit economics. It sets the ceiling for customer acquisition cost and payback.
- CAC payback = CAC ÷ monthly contribution per customer. Higher contribution shortens payback.
- LTV uses contribution, not revenue, to avoid overstating customer value.
- The SaaS magic number calculator and CAC calculator both improve when variable costs are accurate.
- For a full metric set, see the SaaS metrics library.
Track contribution margin next to spend data. If a per-seat tool renews at a higher price, your variable cost per customer rises and contribution falls. A renewal calendar flags that change before it hits the margin.
Frequently asked questions
What is the contribution margin formula?
Contribution Margin = Revenue − Variable Costs. The ratio is (Revenue − Variable Costs) ÷ Revenue.
What costs are included in contribution margin?
Only variable costs that rise with sales or customers, such as hosting, payment fees, support that scales with volume, and per-seat vendor licenses. Fixed costs are excluded.
Is contribution margin the same as gross margin?
No. Gross margin follows accounting rules for cost of goods sold and may include allocated overhead. Contribution margin is a management view that subtracts only variable costs.
How do you calculate break-even using contribution margin?
Divide total fixed costs by contribution margin per unit. The result is the number of units or customers needed to cover fixed costs.
Can contribution margin be negative?
Yes. A negative result means variable costs exceed revenue on that sale, so every unit sold adds to losses. Fix the price or the variable cost.