# Margin Calculator

Calculate profit margin, gross margin, revenue, and cost instantly with step-by-step work. Enter any two values and get the third.

---

- **Canonical URL:** https://dothecalculation.com/calculators/margin-calculator
- **Category:** Business tools
- **Publisher:** Do The Calculation (https://dothecalculation.com)
- **Cost:** Free, no account or sign-up required
- **Privacy:** Runs entirely in the browser; inputs are never sent to a server
- **Methodology:** https://dothecalculation.com/methodology

---

## Work out margin, revenue, or cost

Enter any two of revenue, cost, and margin, and the calculator solves for the third.

- Margin percentage
- Profit in currency
- Markup equivalent

## Margin and markup are not the same number

Margin and markup both describe the gap between what something costs you and what you sell it for. They differ in what they divide that gap by. Margin divides profit by the selling price; markup divides the same profit by the cost. Because the selling price is the larger of the two, margin is always the smaller percentage.

Buy an item for $60 and sell it for $100. The profit is $40 either way. The margin is 40 divided by 100, or 40%. The markup is 40 divided by 60, or 66.7%. Same transaction, two very different-looking numbers.

This is where money is quietly lost. A supplier quotes you a 30% markup and you record it as a 30% margin. Your actual margin is 23%, and every forecast built on that line is seven points optimistic. If you want to price to a target margin, do not add the margin percentage to your cost. Divide instead: to hit a 40% margin on a $60 cost, the price is 60 divided by 0.60, which is $100.

## Gross margin, operating margin, and net margin

The word "margin" on its own is ambiguous, because it depends on which costs you subtracted before you started dividing. Three levels are in common use, and they answer different questions.

Gross margin subtracts only the direct cost of what you sold: materials, the wholesale price, the hours billed to the job. It tells you whether the thing you sell is worth selling at all. This calculator computes gross margin when you enter a direct cost.

Operating margin then subtracts the costs of running the business that are not tied to any one sale, such as rent, salaries, software, and marketing. It tells you whether the business as a whole works at your current volume. Net margin subtracts everything that is left, including interest and tax, and is what actually reaches the owner.

A business can hold a healthy 45% gross margin and still lose money every month, because the overhead behind it is too large for the volume it is doing. Read gross margin as a product question and net margin as a business question, and do not use one as evidence about the other.

## Reading a margin figure honestly

There is no universal "good" margin. A grocery chain running a 2% net margin can be a strong business, because it turns its stock over many times a year. A consultancy at 2% is in trouble. What matters is margin multiplied by volume, and how that compares with businesses that look like yours.

Watch the direction more than the level. A margin that has drifted down two points over four quarters is telling you something concrete: input costs rose, discounting crept in, or your sales mix shifted toward cheaper lines. Any of those is easier to fix early.

Two costs are commonly left out of the denominator and quietly overstate the result. The first is your own unpaid labour, if you are a sole trader or a small team. The second is payment processing, returns, and shipping, which on small-ticket online sales can be several points on their own. Include them and the number gets less flattering, but it becomes usable for pricing.

## Frequently asked questions

### What is a margin calculator?

A margin calculator helps you calculate profit margin, revenue, or cost. Enter any two values and get the third instantly.

### What is the profit margin formula?

The profit margin formula is: Margin % = (Revenue − Cost) ÷ Revenue × 100.

### How do you calculate profit margin?

To calculate profit margin, subtract cost from revenue to get profit, then divide profit by revenue and multiply by 100.

### What is the difference between margin and markup?

Margin is calculated as a percentage of revenue. Markup is calculated as a percentage of cost. Margin is always lower than markup for the same transaction.

### How do I find revenue from cost and margin?

Use the formula: Revenue = Cost ÷ (1 − Margin % ÷ 100). Example: $30 ÷ (1 − 0.40) = $50.

### How do I find cost from revenue and margin?

Use the formula: Cost = Revenue × (1 − Margin % ÷ 100). Example: $50 × (1 − 0.40) = $30.

### What is a good profit margin?

Generally: below 5% is poor, 5-10% is average, 10-20% is good, 20%+ is excellent. It varies by industry.

### What is the difference between gross margin and net margin?

Gross margin is profit after direct costs (COGS). Net margin is profit after ALL expenses (rent, wages, taxes, and more).

### How do I calculate margin in Excel?

Use the formula: =(Revenue − Cost) / Revenue. Example: =(B1-A1)/B1. Format the result as a percentage.

### What is the margin calculation formula?

The margin calculation formula is: Margin % = (Revenue − Cost) ÷ Revenue × 100.

### What is net margin calculation?

Net margin calculation is: Net Margin % = (Revenue − Total Expenses) ÷ Revenue × 100.

### Can margin be over 100%?

No, margin cannot be over 100% because it's a percentage of revenue. The maximum margin is 100% (if cost is $0).

### What if my margin is negative?

A negative margin means you're losing money on each sale. Your costs exceed your revenue.

### Is this margin calculator free?

Yes — completely free with no registration required.

## Related concepts

- **Cost of goods sold (COGS)** — The direct cost of producing or buying the units you actually sold in a period. It excludes rent, salaries, and other overhead.
- **Markup** — Profit expressed as a percentage of cost rather than of price. Always the larger of the two percentages for the same sale.
- **Contribution margin** — Revenue minus the costs that vary with each unit sold. It is what each additional sale contributes toward covering fixed costs.

## Related guides

- [Profit Margin: Formulas, Examples, and Calculator Guide](https://dothecalculation.com/blog/business/profit-margin-calculation) — Calculate gross, operating, and net profit margins, understand margin versus markup, and use each result to make better pricing and cost decisions.
- [Discount, Markup, and Margin: A Practical Pricing Guide](https://dothecalculation.com/blog/business/discount-markup-strategy) — Calculate sale price, markup, and margin, then test how a discount changes unit profit, required sales volume, and the economics of a promotion.

## Related calculators

- [Profit Margin Calculator](https://dothecalculation.com/calculators/profit-margin-calculator) — Calculate profit margin, markup, and gross profit instantly from cost and price to set pricing that keeps your business consistently profitable.
- [Operating Margin & EBIT Calculator](https://dothecalculation.com/calculators/operating-margin-calculator) — Calculate gross profit, operating income, operating margin percentage, and gross margin to evaluate your core business profitability.
- [EBITDA & EBITDA Margin Calculator](https://dothecalculation.com/calculators/ebitda-calculator) — Compute EBITDA, EBITDA margin, and operating EBIT margin from revenue and operating expenses to evaluate core business profitability.
- [Lead Conversion Rate & Sales Funnel ROI Calculator](https://dothecalculation.com/calculators/lead-conversion-roi-calculator) — Estimate lead conversion rates, attributed revenue, campaign ROI, and cost per lead to measure how well your sales funnel performs.
- [Cost of Goods Sold (COGS) Calculator](https://dothecalculation.com/calculators/cogs-calculator) — Calculate cost of goods sold using beginning and ending inventory plus direct costs for accurate accounting and profitability reporting.
- [Customer Acquisition Cost (CAC) & LTV Calculator](https://dothecalculation.com/calculators/customer-acquisition-cost-calculator) — Calculate your customer acquisition cost, lifetime value, LTV to CAC ratio, and CAC payback period to measure marketing efficiency accurately.

---

_This calculator handles the arithmetic of a single margin figure. It does not know your tax treatment, payment fees, returns rate, or how your accountant classifies a given cost, and those can move the result by several points. Use it for pricing and quoting, and check reported margins against your books._

---

_Source: [Do The Calculation](https://dothecalculation.com/calculators/margin-calculator). Quote freely with attribution and a link to this page._
