Gross margin calculator: gross margin percentage and markup from revenue and cost of goods sold. Free, private, editable inputs, runs locally in your browser.
Updates automatically as you type.
Calculated in your browser; your inputs are not sent to us. Privacy
Results will appear here.
Calculation details
Every figure above is calculated locally in your browser from the assumptions shown. No inputs are sent anywhere. See the methodology section below for the formulas used.
Use this resultShare the current inputs, or ask ChatGPT to explain the calculation in context.
Ask an AI to explain this result
Share this result
Review the generated output before relying on it.
This tool runs in your browser. Your calculator inputs and results are never transmitted to us or to ad/affiliate partners. Ads and sponsored links may set third-party cookies to serve and measure them, but they never receive your calculation values. If you explicitly save a scenario, its permitted fields stay in local browser storage until you clear them. See our Privacy Policy.
Use this result
Share the current inputs or ask ChatGPT to explain the calculation in context.
No unrelated authority link is added merely to make this page look sourced. Tool-specific external sources are shown only when they directly support the method, rate, or rule.
Assumptions to Verify
Rates, fees, timing, and rules can change.
Use the result as a planning estimate and verify current terms.
Privacy: The calculation runs in this browser. Shared links contain the page address only, not your inputs or results.
$40k revenue, $24k COGS
What this means for your numbers: The worked example's 40% margin means every $1,000 of added revenue carries $600 of gross profit. A 2-point margin improvement is worth $800 on the same revenue.
Illustrative breakdown using the worked example above. The calculator computes your own numbers with the same formula.
A worked example with the actual arithmetic
Say a workshop sells a cabinet for $4,500 and the materials and direct labor (the COGS) come to $2,700. Gross profit is 4,500 minus 2,700, which is $1,800. Gross margin divides that by revenue: 1,800 / 4,500 = 0.40, so the margin is 40.0%.
Markup divides by cost instead: 1,800 / 2,700 = 0.667, so markup is 66.7%. This is the pair the tool reports, and the gap between them is where most confusion lives. A 40% margin is never a 40% markup; the markup is always the larger number because its denominator (cost) is smaller than price. If you price from a target markup, the margin you end up with is markup / (100 + markup): 66.7 / 166.7 = 40%, which is the same deal seen from the other side.
One more scenario shows why the two diverge fast at low margins. Revenue of $25,000 against COGS of $15,500 gives $9,500 gross profit: a 38.0% margin but a 61.3% markup. Halve the profit and the markup figure roughly doubles relative to the margin, so quoting the wrong one to a supplier or investor can overstate your economics by half again.
What this calculator deliberately does not tell you
The formula counts only what you enter as COGS. It has no opinion on allocation, and that is the main way results get misleading. Freight-in, packaging, payment processing fees, and landed duties are all legitimately part of cost of goods for many businesses, but if you leave them out of the COGS field your margin is overstated by exactly their share of revenue. On $100,000 of sales, uncounted $4,000 of inbound freight inflates a true 36% margin into a reported 40%.
The tool also rejects COGS equal to or above revenue rather than reporting a 0% or negative margin, so breakeven and loss-making pricing show up as input errors, not numbers. And because it works on single totals, it cannot expose mix effects: $100,000 revenue split evenly between a 70%-margin product and a 10%-margin one shows as a blended 40%, which hides that half your units barely clear cost. Run each product line separately to see that.
Finally, gross margin ignores operating expenses entirely. Rent, salaries, and marketing come out below the gross line, so a 38% gross margin business can still lose money overall. Compare your figure against industry norms for the same line item, not against net profit benchmarks.