Skip to content
Tezmy Tools

Margin Calculator

Gross, operating and net profit margin from revenue and costs

What it cost to make or buy what you sold.

Rent, wages, marketing, software and so on.

%
%

Shows the price you'd need for this margin on the same cost.

Gross margin

41.67%

Net margin 13.33%

Gross profit
$50,000.00
Operating profit
$20,000.00 (16.67%)
Tax on profit
$4,000.00
Net profit
$16,000.00 (13.33%)
Markup on cost
71.43%

Margin is profit as a share of sales. Markup is profit as a share of cost. A 40% margin is the same as a 66.7% markup.

Runs in your browser. Nothing is uploaded.

About the Margin Calculator

Margin tells you what share of every sale you keep as profit. This calculator works through the three standard levels. Gross margin looks at revenue after the direct cost of goods, operating margin also subtracts running costs such as rent, wages and marketing, and net margin goes down to profit after tax. Enter your revenue, cost of goods sold, operating expenses and tax rate, and you see each profit in money and as a percentage of revenue, plus the markup on cost. If you give a target gross margin, it works out the selling price you would need for the same cost.

Updated October 2026

How to use the Margin Calculator

  1. 1Enter revenue, the total sales for the period.
  2. 2Enter the cost of goods sold: what the items you sold cost you.
  3. 3Enter operating expenses and the tax rate on profit.
  4. 4Optional: enter a target gross margin to see the required price.
  5. 5Read gross, operating and net margin.

Worked example

A small shop sells 120,000 in a year. The goods cost 70,000, so gross profit is 50,000, a 41.7 percent gross margin. Running costs of 30,000 leave an operating profit of 20,000, or 16.7 percent. After 20 percent tax of 4,000, net profit is 16,000, a 13.3 percent net margin. The markup on cost is 71.4 percent.

For businesses that sell many products, calculate margin for each product or product line rather than only for the total. A shop may find that a few high-margin items carry the rest, or that its best-selling item barely breaks even once discounts and returns are counted. Use the calculator once per line, then compare the results and decide where to focus marketing, shelf space and supplier negotiations to lift the overall margin.

Margins also help when you set prices for services. Add up your direct costs, such as materials and subcontractors, and decide on the margin you need to cover overheads and leave a profit. Then use the target-margin box to find the price. Many small businesses underprice because they forget that margin is a share of the selling price, not a share of cost, so a 30 percent margin needs a bigger uplift on cost than 30 percent.

Ways to improve margins

  • Raise prices where customers will accept it.
  • Negotiate better prices with suppliers.
  • Reduce waste and returns.
  • Sell more of your highest-margin products.
  • Cut costs that don't add value.

Reading the numbers

Track margins over time, not only as a single number. A falling gross margin often points to supplier price rises or discounting. A falling operating margin with a steady gross margin points to costs growing faster than sales. Compare against your industry's averages to find where you stand.

Related tools

The Markup Calculator starts from cost, the Profit Margin Calculator offers a simpler view, the Break-Even Calculator shows the sales needed to cover costs and the Discount Calculator tests how promotions affect price.

Features

  • Gross, operating and net profit and margin
  • Markup on cost
  • Tax step
  • Target price for a chosen margin
  • Any currency
  • Handles losses

Frequently asked questions

What is the margin formula?

Margin equals profit divided by revenue, times 100. If you sell 120,000 and your gross profit is 50,000, the gross margin is 41.7 percent.

What is the difference between gross, operating and net margin?

Gross margin removes only direct costs. Operating margin also removes day-to-day running costs. Net margin removes everything, including interest and tax. Each is a smaller number than the last.

What is the difference between margin and markup?

Margin is profit as a share of the selling price. Markup is profit as a share of cost. A 40 percent margin equals a 66.7 percent markup, because the same profit is divided by a smaller number.

What is a good profit margin?

It varies by industry. Software can have gross margins above 80 percent, restaurants often net 3 to 9 percent and grocery stores 1 to 3 percent. Compare yourself with similar businesses.

How do I price for a target margin?

Divide the cost by one minus the margin as a decimal. For a cost of 60 and a target of 40 percent, the price is 60 ÷ 0.6 = 100. The tool shows this when you enter a target.

Why is my net margin negative?

Your costs and tax exceed revenue, so you are making a loss. Check which level turns negative first: if gross margin is positive but operating margin is negative, running costs are the problem.

Related tools