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

SymbolMeaning
PSale price
DDiscount amount
SCShipping the customer pays
OROther order revenue
CProduct cost (COGS)
SFShipping the seller pays
PKPackaging cost
OVOther variable cost
FPPlatform fee rate
FYPayment processing fee rate
FFFixed fee per transaction
TTax the seller bears
AAdvertising cost per order
RReturn rate
RCAverage 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

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.