How to use this calculator
Enter three figures for the same period, such as a month, a quarter or a year.
- Revenue: total sales before any costs are taken out.
- Cost of goods sold: the direct cost of what you sold, such as materials, stock purchases and production labor. It is often shortened to COGS.
- Operating expenses: the cost of running the business, such as rent, marketing, admin salaries and software.
The calculator returns gross profit and gross margin, net profit and net margin, and the markup on cost. You can also use it for a single product by entering its price as revenue, its cost as COGS and zero for operating expenses.
Worked example
These are the starting values in the calculator above and the results they give. Change any input to see your own numbers.
- Revenue
- $100,000
- Cost of goods sold
- $60,000
- Operating expenses
- $25,000
- Gross margin
- 40%
- Gross profit
- $40,000
- Net profit
- $15,000
- Net margin
- 15%
- Markup
- 66.67%
How profit margin is calculated
Gross profit is revenue minus cost of goods sold. Gross margin is gross profit divided by revenue, shown as a percent. It tells you how much each sales dollar leaves after the direct cost of the product.
Net profit here is gross profit minus operating expenses. Net margin is net profit divided by revenue. It shows what is left after the business has paid to run itself. This calculator stops at operating expenses, so interest and taxes are not deducted unless you include them in your expense figure.
Markup is gross profit divided by cost of goods sold. It uses the same dollars of profit as gross margin but compares them with cost instead of revenue. Suppose revenue is $100 and COGS is $60. Gross profit is $40, gross margin is 40% and markup is about 66.7%. The margin vs markup guide explains why the two numbers differ.
Gross margin % = (R − C) ÷ R × 100; Net margin % = (R − C − E) ÷ R × 100- R
- revenue
- C
- cost of goods sold
- E
- operating expenses
- R − C
- gross profit
- R − C − E
- net profit
What a good margin looks like
There is no single good margin. It depends heavily on the industry and the business model.
- Businesses that sell high volumes of physical goods, such as grocery and distribution, often run on thin net margins of a few percent.
- Service and software businesses tend to have high gross margins because the direct cost of each sale is low. Their operating expenses then decide how much reaches the bottom line.
- As a rough rule of thumb, many small business owners treat a net margin near 10% as average, around 20% as strong and around 5% as thin. Treat these as loose markers, not targets.
The more useful comparisons are with your own past periods and with similar businesses. A falling gross margin points to pricing or supplier costs. A steady gross margin with a falling net margin points to overheads growing faster than sales. To see how much volume you need to cover those overheads, try the break-even calculator.
Frequently asked questions
What is the difference between gross margin and net margin?
Gross margin only subtracts the direct cost of the goods or services sold, so it measures how profitable the product itself is. Net margin also subtracts operating expenses such as rent, marketing and admin, so it measures how profitable the whole business is. A company can have a high gross margin and still lose money if its overheads are too large for its sales.
What is a good profit margin for a small business?
It varies widely by industry. A common rule of thumb puts a net margin around 10% as average, around 20% as strong and around 5% as low, but a retailer and a consultancy should not expect the same figure. Compare your margin with businesses of a similar type and size, and track how your own number changes over time.
Is margin the same as markup?
No. Both use the same profit in dollars, but margin divides it by the selling price and markup divides it by the cost. Because cost is smaller than price, markup is always the larger percentage when there is a profit. A 50% markup, for example, produces a margin of about 33.3%. Mixing the two up is a common cause of underpricing.
How do I calculate profit margin from revenue and cost?
Subtract the cost from the revenue to get profit, divide the profit by the revenue, then multiply by 100 to get a percent. With revenue of $200 and total costs of $150, profit is $50 and the margin is 25%. Use only direct costs to get gross margin, or include operating expenses as well to get net margin.
Why is my net margin low when my gross margin is high?
A high gross margin means each sale is profitable before overheads. If the net margin is still low, operating expenses are absorbing most of that profit. Common causes are high rent, heavy marketing spend, a large payroll compared with sales, or revenue that is simply too small to spread fixed costs over. Growing sales faster than overheads usually widens the net margin.
This calculator gives estimates for education only. It does not know your full situation and is not financial advice. Reviewed and updated November 15, 2026.