Compare profit, margin and markup
- Enter direct cost and selling price for the same item, or comparable total COGS and revenue for the same period.
- Choose gross margin or markup, then enter its percentage to calculate a target price.
- Calculate, review the separate ratios and download the result.
Formulas and example
Gross profit = revenue − direct cost. Gross margin = profit ÷ revenue × 100%. Markup = profit ÷ cost × 100%. Price for target margin m = cost ÷ (1 − m ÷ 100). Price for target markup u = cost × (1 + u ÷ 100).
Cost 100 and price 150 gives profit 50, gross margin about 33.33% and markup 50%. A 20% target margin needs price 125, rather than 120. At price 80 and cost 100, loss is 20, margin −25% and markup −20%.
Xero’s margin and markup explanation distinguishes revenue and cost denominators. This calculator uses gross amounts relative to entered direct costs; the optional other-expenses field subtracts only expenses you supply. It is not a complete financial statement.
Assumptions and limits
No automatic tax, currency conversion, overhead, discounts, transaction fees or shipping-cost treatment. Include relevant additional expenses yourself without double-counting direct cost. Enter comparable amounts and relevant direct costs yourself. The target is chosen by you and does not recommend a market price. Gross margin does not determine whether your entire business is profitable.
Cost 0–1 trillion units, with positive cost and revenue at least 1e-12; revenue and other expenses 0–1 trillion; target margin 0–99.99% or markup 0–1,000,000%. A zero cost and positive revenue gives 100% gross margin, but markup is undefined and no positive price can produce a target below 100%; those margin-target outputs are labeled undefined. A percentage markup on zero cost gives a zero target price, not a positive profit. Zero revenue is supported, with undefined gross margin. Losses are supported.
Privacy and rounding
Inputs stay in browser memory without uploads or saved financial values. CSV includes cost, revenue, target, gross profit, ratios, other expenses and profit after entered expenses; undefined zero-cost or zero-revenue values use empty numeric fields with a note. Tiny nonzero monetary values use scientific notation on screen and in CSV instead of rounding to zero. Other exported results normally use six decimals. Currency rounding can affect a target price. The target-price action uses the full calculated amount as revenue; review currency rounding before using a selling price. It is unavailable when the target is undefined or exceeds the supported revenue limit. Estimates are not accounting or pricing advice. Reset restores illustrative defaults. Undo last action restores your raw inputs, currency search, disclosure states and accepted result after Reset, removing expenses or applying the target price. Editing a value discards that recovery step.
Is 50% markup the same as 50% margin?
No. At cost 100, 50% markup gives price 150 and margin 33.33%. A 50% margin requires price 200.
Does this include operating expenses?
Open “Include other expenses” to enter their total. Profit after entered costs = revenue − direct cost − other expenses. Gross margin, markup and target price continue to use direct cost only. Nothing is inferred automatically.