Methodology
This page documents exactly how the profit calculator computes its results. The formulas below match the calculation code, not a simplified summary of it.
Inputs
| Symbol | Meaning |
|---|---|
| P | Sale price |
| D | Discount amount |
| SC | Shipping the customer pays |
| OR | Other order revenue |
| C | Product cost (COGS) |
| SF | Shipping the seller pays |
| PK | Packaging cost |
| OV | Other variable cost |
| FP | Platform fee rate |
| FY | Payment processing fee rate |
| FF | Fixed fee per transaction |
| T | Tax the seller bears |
| A | Advertising cost per order |
| R | Return rate |
| RC | Average loss per returned order |
Calculation order
Net sales = P - D Order revenue = Net sales + SC + OR Percentage fees = Order revenue × (FP + FY) Expected return loss = R × RC Base variable cost = C + SF + PK + OV + Percentage fees + FF + T + A Expected profit/order = Order revenue - Base variable cost - Expected return loss Net margin = Expected profit/order ÷ Order revenue Maximum CPA = Order revenue - all non-advertising costs Break-even ROAS = Order revenue ÷ Maximum CPA
Returns
Sellers handle returned inventory very differently — some resell it, some write it off entirely, some pay separate return shipping. Rather than guess a recovery model, CartMargin asks you to enter the average loss per returned order (RC) directly. If you don't know this number precisely, your product cost is usually a reasonable starting estimate.
Rounding
The calculator does not round intermediate values — only the final displayed numbers are formatted (currency to two decimal places, rates to one decimal percentage point). This avoids compounding rounding errors across the eight steps above.
Edge cases
- If order revenue is zero (for example, a 100% discount with no shipping charged), net margin is shown as 0% instead of an undefined value.
- If costs exceed order revenue enough that no advertising spend could break even, break-even ROAS is shown as "—" instead of a number.
- Negative inputs and fee rates that sum above 100% are computed as entered — the calculator will show the resulting loss rather than silently blocking the input.
Other calculators
The break-even ROAS calculator and discount profit calculator reuse the exact formulas above — the first reads off maximum CPA and break-even ROAS without needing an ad-cost input, and the second runs the calculation twice (with and without a discount) to compare results.
The profit margin calculator combines margin and markup calculation into one tool, since they answer overlapping questions from the same two numbers:
Margin = (Price - Cost) ÷ Price Markup = (Price - Cost) ÷ Cost
The product pricing calculator solves the profit formula in reverse for price, assuming no discount and no separate customer-paid shipping (order revenue equals price):
Price = (Fixed fee + fixed costs) ÷ (1 - fee rate - target margin)
This is an educational calculation, not tax, accounting, or financial advice.