Gross margin and markup calculator
Calculators
Loading
Loading tool
The tool is loaded only when you open it.
All processing for this tool happens in your browser. Your input is not sent to a server.
About this tool
For one sale, gross profit is P − C. Gross margin divides by selling price P; markup divides by merchandise cost C. Analyze an entered price or reverse either gross target. Fixed fees and a percentage of P are entered separately; profit after those fees is not accounting net profit.
Common uses
- Check why cost 80 and price 100 gives gross margin 20% but markup 25%; fixed fee 3 and sales fee 5% leave profit 12.
- Solve a gross target price, then inspect how entered fees affect the remaining profit without silently redefining the gross target.
How to use it
- 1.Choose price analysis, target gross margin or target markup. Enter merchandise cost and one three-uppercase-letter currency label.
- 2.Enter price or the selected target percentage, plus fixed fee per sale and sales fee as a percentage of P; calculate.
- 3.Inspect exact formulas, separate gross and fee-adjusted metrics, undefined ratios and optional local JSON.
Limits and notes
- Amounts: nonnegative ASCII dot decimals, up to 12 integer and 6 fractional digits. Target may be signed. Gross-margin target: −1000000% to below 100%; markup: above −100% to 1000000%; sales fee: 0–100%. JSON ≤ 32 KiB.
- Reverse gross pricing requires C > 0: P = C / (1 − margin / 100), or P = C × (1 + markup / 100). Other fees do not change this gross target; no automatic fee-adjusted target or rounding-up recommendation.
- P = 0 makes gross/after-fee margins undefined; C = 0 makes markup undefined. Losses remain negative. Exact reduced fractions and 6-decimal nearest rounding, ties away from zero; display is not a currency charge.
- One sale in one currency and tax basis. Enter the discounted price and avoid double-counting fixed fees already in C. No FX, automatic taxes/platform fees, cost classification, expense storage or net-profit guarantee. JSON contains all input values; changes and leaving discard results.
Frequently asked questions
Why are 20% gross margin and 20% markup different?
At C = 80, gross margin 20% gives P = 100, while markup 20% gives P = 96. With P = 100, (100 − 80) / 100 = 20%, but (100 − 80) / 80 = 25%.
Do entered fees change gross margin or the reverse price?
No. Other fees are F + P × r / 100. Profit after entered fees is P − C − F − P × r / 100; its margin divides by P. For C = 80, P = 100, F = 3 and r = 5, gross profit is 20 but profit after fees is 12. This is not accounting net profit.
What happens at zero cost, zero price or impossible targets?
Analysis permits zero: zero price makes margins undefined and zero cost makes markup undefined. Reverse pricing requires positive cost; gross target 100% or above and markup −100% or below are rejected, with the stated bounded target ranges.
How are repeating fractions and exports handled?
For C = 80 and gross margin 25%, exact P = 320/3 and displayed P = 106.666667. Calculations and exact target checks use the fraction, not display rounding. JSON contains original strings, exact fractions, rounded values and grouped formulas; no executable expressions or financial lookup.