Work out profit and margin in every direction: revenue and costs to gross margin, cost and a target margin to the selling price you must charge, and revenue and a target margin to the maximum costs you can allow. Add other operating costs to see gross vs net margin side by side. Everything updates live in your browser; the defaults are the worked example.
The maths: gross profit = revenue − total costs. Gross margin % = gross profit ÷ revenue × 100. Net profit = gross profit − other operating costs; net margin % = net profit ÷ revenue × 100. Selling price = cost ÷ (1 − margin). Maximum costs = revenue × (1 − target margin).
Set a cost and target margin for a price, and a revenue and target margin for a cost ceiling.
Gross margin only takes off the direct cost of what you sold. Net margin takes off everything else as well — rent, wages, marketing — so net is always the smaller, truer number for the whole business. Zero or empty revenue shows a dash instead of dividing by zero.
—
Profit and gross margin from revenue and costs, the selling price for a target margin, maximum allowable costs, and gross vs net margin side by side.
100% free · No sign-up · No daily limits · No watermarks · Processed in your browser — files never leave your device
Work out profit and margin in every direction: gross profit and gross margin % from revenue and total costs, the selling price a cost needs at a target margin, the maximum costs a revenue can carry at a target margin, and — with other operating costs added — net profit and net margin shown side by side with the gross figures.
Revenue is $500 and total costs are $320, so gross profit is $500 − $320 = $180 and gross margin is $180 ÷ $500 × 100 = 36%. Working backwards, a $320 cost at a 36% margin needs a price of $320 ÷ (1 − 0.36) = $320 ÷ 0.64 = $500 — the same figure, as it should be. On $500 of revenue a tougher 40% target margin allows maximum costs of $500 × (1 − 0.40) = $300 and keeps $200 of profit. Add $30 of other operating costs and net profit falls to $180 − $30 = $150, a net margin of $150 ÷ $500 × 100 = 30% — six points below gross.
Gross profit = revenue − total direct costs. Gross margin % = gross profit ÷ revenue × 100. Net profit = gross profit − other operating costs; net margin % = net profit ÷ revenue × 100. Selling price from a target margin = cost ÷ (1 − margin as a decimal) — because margin is a share of the price, not of the cost, you divide instead of adding a percentage on top. Maximum allowable costs = revenue × (1 − target margin), and the profit at that margin is revenue × target margin. A margin of 100% or more has no price: it would require zero or negative costs, so the calculator flags it instead of dividing by zero or a negative. Empty or zero revenue shows a dash rather than a percentage.
Gross margin takes off only the direct cost of what you sold: (revenue − direct costs) ÷ revenue. Net margin takes off everything else as well — rent, wages, marketing, software — so it is always lower. In the example, $30 of operating costs moves the margin from 36% gross to 30% net. Gross tells you whether the product itself earns; net tells you whether the business earns.
Because margin is measured on the price, not on the cost. Adding 36% onto a $320 cost gives $435.20, whose margin is only ($435.20 − $320) ÷ $435.20 = 26.5% — you would quietly give away almost ten points. Dividing by (1 − 0.36) = 0.64 gives $500, and $180 ÷ $500 really is 36%. Adding a percentage onto cost is markup, a different measure.
No. Margin divides profit by the selling price; markup divides profit by the cost. The same $180 profit on a $320 cost sold at $500 is a 36% margin but a 56.25% markup. Margin can never reach 100% (that would need zero costs); markup has no ceiling. Mixing them up is one of the commonest pricing errors — use the Markup Calculator to convert between them.
It depends entirely on the industry: grocery and high-volume retail often run on low single-digit net margins, while software and services can run far higher, because their cost structures are completely different. The useful comparisons are against your own previous periods and against businesses with the same cost structure — a single universal “good” number does not exist, so this calculator shows your figures without grading them.
Profit and margin go negative, and the calculator shows them negative rather than hiding the loss — a −25% margin means you lose 25 cents for every dollar sold before overhead. The reverse solvers still work in that state, which is the point: raise the target margin in the price solver and it tells you the price that would fix it.
A 100% margin means the entire price is profit and the cost is $0. For any real cost above zero the price would have to be infinite — cost ÷ (1 − 1) is division by zero — so the calculator says so plainly instead of showing a nonsense figure.
What is missing, broken, or could be better on this tool? Tell us — we read every suggestion.
✅ Thanks — your suggestion has been received. Suggestions like yours shape what we build next.