← Toolz / Finance & Business / Profit Margin Calculator

Profit Margin Calculator

FIN·31

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.

Forward — revenue & costs to margin
Total sales for the period or the product — the selling price × units, before any costs come off.
Direct costs of what you sold — materials, stock, production, per-sale fees. This gives your gross profit and gross margin.
Rent, salaries, marketing, software and other running costs. Leave at 0 if you only want gross margin — with a value here you also get net profit and net margin.
Reverse — price from cost & target margin
Selling price = cost ÷ (1 − margin). A 36% margin on a $320 cost needs a $500 price — margin is a share of the price, not a mark-up on cost.
Reverse — maximum costs from revenue & target margin
Maximum allowable costs = revenue × (1 − target margin). At $500 revenue and a 40% target, costs must stay at or under $300.

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).

Gross margin
—
—
Gross profit
—
Gross margin %
—
Costs as % of revenue
—
Net profit
—
Net margin %
—
Gross → net gap
—
—
Reverse results
Selling price for target margin
—
Maximum allowable costs
—
Profit built into that price
—
Profit at 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.

Worked breakdown — your numbers, step by step

—

Gross margin
—
—

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

UNDERSTAND YOUR RESULTS

Profit Margin Calculator — Gross Margin, Net Margin and Price from Margin guide

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.

How to use this tool

  1. Enter revenue and total (direct) costs in the Forward section and read gross profit and gross margin % straight away.
  2. Add other operating costs — rent, salaries, marketing — to see net profit and net margin next to the gross figures, with the gap between them in points.
  3. To price from a margin, enter the cost and the target margin % in the first Reverse section: price = cost ÷ (1 − margin).
  4. To budget from a margin, enter revenue and a target margin % in the second Reverse section to get the maximum allowable costs and the profit that margin keeps.
  5. Read the worked breakdown under the results — it restates every sum with your own numbers so you can check it by hand.

A worked example

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.

What you can do with this tool

How it works

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.

Frequently asked questions

What is the difference between gross margin and net margin?

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.

Why is the price cost ÷ (1 − margin), not cost plus the margin %?

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.

Is margin the same as markup?

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.

What is a good profit margin?

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.

What happens if my costs are higher than my revenue?

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.

Why does a 100% margin show no price?

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.