Profit Margin Calculator
Work out how much of each sale you actually keep. Enter your revenue and your costs, and the calculator shows gross profit, gross margin, markup on cost, net profit and net margin, with every step shown. Free, no sign-up, everything runs in your browser.
Formulas: Gross profit = Revenue - Cost of goods sold. Gross margin = Gross profit / Revenue × 100. Markup = Gross profit / Cost of goods sold × 100. Net margin = Net profit / Revenue × 100.
Formulas verified against standard references. Calculator logic tested with verified worked examples. Published: November 8, 2026 | Last updated: November 8, 2026. Fact-checked: November 8, 2026. Our methodology
How to Use the Profit Margin Calculator
One product or one period takes four numbers. The tool works out gross margin first, then takes off the rest of your costs to find net margin.
- Type your revenue, which is total sales before any costs.
- Type the cost of goods sold, which is the direct cost of what you sold, such as materials, goods and direct labor.
- Type your operating expenses, such as rent, salaries and marketing. Enter 0 if you only want the gross margin.
- Type any other expenses, such as interest and tax, then press Calculate, or press Enter. The gross margin appears first and large, with gross profit, markup, net profit and net margin below, plus the step-by-step math. Press Reset to clear the form and start over.

The Profit Margin Formulas
Five formulas cover the whole picture. Each one divides by a different number, so keep track of which denominator you are using.
Gross profit: Gross profit = Revenue - Cost of goods sold. With $80.00 of revenue and $50.00 of cost, gross profit is $30.00. Cost of goods sold covers only the direct cost of what you sold, not rent or salaries.
Gross margin: Gross margin = Gross profit / Revenue × 100. Here it is $30.00 / $80.00 × 100 = 37.5%. Margin always divides by revenue, which is the selling price, so it tells you what share of each sale is profit.
Markup: Markup = Gross profit / Cost of goods sold × 100. Here it is $30.00 / $50.00 × 100 = 60%. Markup divides by cost, not by price, so the same $30.00 of profit gives a bigger percent than the margin does.
Net profit and net margin: Net profit = Revenue - Cost of goods sold - Operating expenses - Other expenses. Net margin = Net profit / Revenue × 100. With $10.00 of operating expenses and $5.00 of other expenses, net profit is $15.00 and net margin is 18.75%.

Worked Example: $80 of Sales
A shop sells one item for $80.00. The item costs $50.00 to buy, operating expenses are $10.00 and other expenses are $5.00. Here is exactly what the calculator does.
- Gross profit = $80.00 - $50.00 = $30.00.
- Gross margin = $30.00 / $80.00 × 100 = 37.5%.
- Markup = $30.00 / $50.00 × 100 = 60%.
- Net profit = $80.00 - $50.00 - $10.00 - $5.00 = $15.00.
- Net margin = $15.00 / $80.00 × 100 = 18.75%.
This matches the PonderLoop worked example exactly, which gives the same $30.00 gross profit, 37.5% margin and 60% markup on $80.00 of revenue and $50.00 of cost. As a second check, the same $80.00 of revenue with $65.00 of total expenses leaves $15.00, a net margin of 18.75%, which is what PonderLoop publishes for its net-margin mode.
Margin vs Markup: Same Profit, Different Percent
Margin and markup describe the same profit with different denominators, and mixing them up is the most common pricing error. Margin divides by the selling price, markup divides by the cost. A 50% margin needs a 100% markup, because $50.00 of profit on a $50.00 cost is half of a $100.00 price.
| Target margin | Markup needed | Selling price |
|---|---|---|
| 20% | 25% | $125.00 |
| 40% | 66.67% | $166.67 |
| 50% | 100% | $200.00 |
| 60% | 150% | $250.00 |
To find a price from a target margin, use Price = Cost / (1 - Margin as a decimal). A $50.00 cost at a 40% margin needs $50.00 / 0.60 = $83.33. Use our markup calculator to work the other way round, from a markup to a price, and our break even calculator to find the sales volume that covers your fixed costs.
Gross Margin vs Net Margin
Gross margin measures the product. It asks whether the thing you sell is priced above what it costs to make or buy. A healthy gross margin means the product itself works, even before rent and salaries.
Net margin measures the business. It subtracts everything, which is cost of goods sold, operating expenses, interest and tax. Net margin is always at or below gross margin when the extra expenses are positive, and it is the number that decides whether the business survives.
Watch both together. A shop with a 60% gross margin and a 5% net margin has a pricing problem only in its overhead, while a shop with a 20% gross margin and a 15% net margin has a product problem. In the worked example, gross margin is 37.5% and net margin is 18.75%, so about half the gross profit is eaten by operating and other expenses.
Common Margin Mistakes
The first mistake is calling markup a margin. A 60% markup is a 37.5% margin, not a 60% margin, so quoting the markup as your margin overstates your profit by more than half. Always say which one you mean.
The second mistake is leaving costs out of the cost of goods sold. Card fees, delivery, packaging and returns are real costs of the sale. If they sit nowhere in your numbers, the margin looks better than it is. Put them in the cost or the expenses, but put them somewhere.
The third mistake is judging a margin without a period. A 40% margin on one good week means little if the month includes refunds and slow days. Run the same numbers for a full month or quarter, and compare like with like using our ROI calculator when you weigh a new product or expense.
Disclaimer
This calculator gives an estimate for planning and is for informational purposes only, not financial advice. Actual margins depend on your costs, taxes and how you allocate overhead. See our disclaimer.

Frequently asked questions
How do I calculate profit margin?
Subtract the cost of goods sold from revenue to get gross profit, then divide gross profit by revenue and multiply by 100. With $80.00 of revenue and $50.00 of cost, gross profit is $30.00 and the margin is $30.00 / $80.00 x 100 = 37.5%.
What is the difference between margin and markup?
Margin is profit divided by the selling price, and markup is profit divided by the cost. The same $30.00 of profit on $80.00 of revenue and $50.00 of cost is a 37.5% margin and a 60% markup. A 50% margin needs a 100% markup.
What is a good profit margin?
It depends on the business. Retail and grocery often run thin gross margins near 20 to 30%, while services and software run higher. What matters is whether the net margin covers your overhead and leaves a profit after everything, not a single magic number.
How do I find the price for a target margin?
Divide the cost by one minus the margin as a decimal. A $50.00 cost at a 40% margin needs a price of $50.00 / (1 - 0.40) = $83.33. Raise the price if the result is below what customers will pay for, or cut the cost if it is above.
Is net margin always lower than gross margin?
Yes, whenever operating and other expenses are positive, because net margin subtracts those costs too. Net margin equals gross margin only when there are no other expenses at all. In the worked example, gross margin is 37.5% and net margin is 18.75%.
Related calculators
Markup Calculator
Work a price from a markup on cost.
Use calculatorBreak Even Calculator
Find the sales volume that covers your costs.
Use calculatorROI Calculator
Weigh the return on a new product or expense.
Use calculatorSales Tax Calculator
Work out the tax on a sale.
Use calculatorDiscount Calculator
See what a discount does to your margin.
Use calculatorCommission Calculator
Work out sales commission on a deal.
Use calculator