Methodology
Every number on ProfitUnfold comes from a formula you can read and a rule you can check.
Money is calculated in whole cents
Amounts are held as integer cents and percentages as integer basis points (1 basis point is 0.01%). Floating-point arithmetic is never used for money totals, so results do not drift by a cent.
Rounding
Each percentage fee is rounded once, half away from zero, to the nearest cent. Totals add the rounded lines, so every line on screen sums exactly to the total.
Formulas
Terms are used consistently across all tools. Break-even ROAS applies only when the pre-ad margin is above zero.
- Profit margin
profit ÷ revenue - Markup
profit ÷ cost - ROAS
ad-attributed revenue ÷ ad spend - ACOS
ad spend ÷ ad-attributed revenue - Break-even ROAS
1 ÷ pre-ad margin - Price for a target margin
fixed costs ÷ (1 − percentage fees − target margin) - Gross margin
(revenue − cost of goods sold) ÷ revenue - Contribution margin
price − variable cost per unit - ROI
(amount returned − amount invested) ÷ amount invested - CPC
ad spend ÷ clicks - CPM
ad spend ÷ impressions × 1,000 - CTR
clicks ÷ impressions - TACoS
ad spend ÷ total sales - COGS
beginning inventory + purchases + direct costs − ending inventory
Gross, contribution and net profit
Gross profit is revenue after refunds minus product cost. Contribution profit also subtracts fees, shipping, packaging, other per-order costs and advertising. Neither includes overhead or income tax, so neither is net profit, and we do not label them as such.
Cases with no meaningful answer
If a margin is requested on zero revenue, or a break-even is impossible, the tool says so in words. It never shows NaN, infinity or a misleading zero.
Testing
The calculation engine is covered by automated tests, including rounding, zero denominators, negative profit and very large orders. Test results are published in the project repository once it is public.