Skip to content
BizMathKit

Profit Margin Calculator

Find your gross margin and markup from a price and cost, the price you need for a target margin, or your business's gross, operating and net margins.

What the item cost you to make or buy.
Gross margin
40%
$40.00 gross profit
Gross profit
$40.00
Markup
66.67%
Cost share
60%
Cost $60.00Profit $40.00

Gross margin = ($100.00 − $60.00) ÷ $100.00 × 100 = 40%

Step by step

How to use the profit margin calculator

  1. Pick Margin to check one product, Price to work from a target margin, or Business for your whole profit and loss.
  2. In Price mode, say whether you know your cost (to get a selling price) or your price (to get the most you can pay).
  3. Enter your revenue (or selling price) and cost of goods sold.
  4. In Business mode, add operating expenses, and interest and taxes if you want net margin.
  5. Copy the result or share a link that reopens your numbers.
The math

The profit margin formulas

Every margin is a profit divided by revenue. What changes is which costs you take away first.

Gross margin % = (Revenue − COGS) ÷ Revenue × 100
Operating margin % = (Gross profit − Expenses) ÷ Revenue × 100
Net margin % = Net profit ÷ Revenue × 100
Revenue
sales, before any costs
COGS
cost of the goods you sold: stock, materials, direct labor
Expenses
running costs: wages, rent, utilities, marketing
Net profit
what is left after expenses, interest and taxes
Worked example
$40÷$100=40%
A product sells for $100 and costs $60 to make. The $40 gross profit is a 40% margin and a 66.67% markup.
Three views of profit

Gross, operating and net margin

Gross margin tells you whether your prices cover the cost of what you sell. Operating margin shows whether the business covers its running costs. Net margin is the bottom line after interest and taxes. A business can have a healthy 60% gross margin and still lose money if rent and wages eat the rest — which is why the Business mode shows all three side by side.

To raise a margin you can charge more, buy or make for less, or cut running costs. A small price rise usually moves margin fastest: on a $100 product with a 40% margin, a 5% price rise lifts the margin to 42.9%.

Restaurant profit margin

For a restaurant, COGS is your food and drink cost. Your gross margin shows how well menu prices cover ingredients; net margin shows what's left after labor, rent and everything else.

Margins in the industry are thin. Toast puts typical net margins at 3–5% for full-service restaurants and 6–9% for quick-service and fast casual, so a few points of food or labor cost make a big difference. To price individual dishes, use the menu pricing calculator.

Margin vs markup

Margin is measured against the price; markup against the cost. So the same sale always shows a smaller margin than markup: a 25% margin is a 33.33% markup, and a 50% margin needs a 100% markup.

Planning in margin protects you from a common mistake — adding a 30% markup when you meant to earn a 30% margin leaves you with only 23.08%.

FAQ

Common questions

How do you calculate gross profit margin?
Subtract the cost from the revenue to get gross profit, divide the gross profit by the revenue, then multiply by 100. Revenue of $100 with a $60 cost is a $40 profit and a 40% margin.
What is the difference between gross and net profit margin?
Gross margin only takes away the direct cost of what you sold. Net margin takes away every cost — wages, rent, software, interest and taxes — so it shows what the business really keeps. Use the Business mode to see both.
What is a good profit margin?
It depends on the industry. Restaurants run thin: Toast reports typical net margins of 3–5% for full-service restaurants and 6–9% for quick-service. Software and services can be much higher. Compare yourself with businesses like yours, and with your own margin last year.
Is margin the same as markup?
No. Margin is profit as a share of the price; markup is profit as a share of the cost. A 40% margin is a 66.67% markup. The markup calculator works the other way round.
How do I price for a 30% margin?
Divide your cost by 0.70 (that is, 1 − 0.30). A $35 cost needs a $50 price for a 30% margin. Pick the Price mode above to do it for any margin.
What is a 30% margin on $100?
If $100 is the selling price, a 30% margin is $30 of gross profit, so the item can cost up to $70. If $100 is your cost, you need to charge $142.86 to keep a 30% margin.
How do I calculate a 40% gross margin?
Divide the cost by 0.60 to get the price: a $60 cost gives a $100 price. Starting from a price instead, multiply it by 0.60 to find the highest cost that still leaves 40%.
How do I calculate gross margin in Excel?
Put revenue in A2 and cost of goods sold in B2, enter =IF(A2>0, (A2-B2)/A2, "") and format the cell as a percentage.
Can profit margin be negative?
Yes. If costs are higher than revenue, the margin is negative — you lose money on each sale. The calculator shows the loss rather than hiding it.

Related tools

Built and checked by BizMathKit
Checked by hand against Xero’s gross margin guide, Sage’s margin formulas and Toast’s restaurant margin data. How we check formulas. Last updated . Runs in your browser — nothing you enter is sent anywhere.