Find your profit margin, selling price, or cost of goods from any two of the others — convert between margin and markup, apply a discount to see its real margin impact, add sales tax or VAT, and check a company's overall gross margin. All instantly.
✓ Five calculation modes ✓ Solve for cost, revenue, margin, or profit ✓ Works on mobile
If you've searched "margin calculator," "profit margin calculator," "margin vs markup calculator," or "how to calculate profit margin," this page is built to answer every version of that question — with a live tool, not just a single fixed formula.
Everything business owners, retailers, and finance students ask about margin, markup, and pricing.
Profit margin is the percentage of a sale's revenue that remains as profit after subtracting the cost of goods sold — it answers "how much of every dollar I bring in do I actually keep?" This is exactly the question behind "margin calculator," "profit margin calculator," and "how to calculate profit margin" searches. A healthy margin means a business has room to absorb unexpected costs or price pressure; a thin margin means even small increases in cost or small discounts can meaningfully hurt profitability, which is exactly why margin is treated as one of the most important numbers in retail and business finance.
Margin is calculated as Margin = (Revenue − Cost) ÷ Revenue, expressed as a percentage — note that it's based on revenue (the selling price), not on cost. First, find the gross profit by subtracting cost from revenue; then divide that profit by revenue and multiply by 100 to get the margin percentage. For example, an item that costs $80 to produce and sells for $100 has a profit of $20, giving a margin of $20 ÷ $100 = 20%. Because this relationship connects four quantities — cost, revenue, profit, and margin — knowing any two lets you solve for the rest, which is exactly what the Solve Margin mode above does.
Margin and markup describe the exact same $20 profit on that $80-cost, $100-price item, but as different percentages of different base numbers — and mixing them up is one of the most common and costly pricing mistakes a business can make. Margin expresses profit as a percentage of revenue (selling price): $20 ÷ $100 = 20%. Markup expresses that same profit as a percentage of cost: $20 ÷ $80 = 25%. The two are mathematically related by Markup = Margin ÷ (1 − Margin) and Margin = Markup ÷ (1 + Markup), both using decimal form. This is exactly why the Margin ↔ Markup mode above exists — pricing a product using a 25% "margin" when you actually meant a 25% markup (or vice versa) changes your actual profit by a meaningful amount.
Offering a discount doesn't just reduce your profit by the size of the discount — because margin is calculated as a percentage of revenue, and revenue itself shrinks when you discount, the resulting margin erosion is actually somewhat worse than the discount percentage alone might suggest. The relationship is New Margin = (Old Margin − Discount) ÷ (1 − Discount), both in decimal form. This is exactly why "how does a discount affect profit margin" is worth checking with real numbers rather than assuming a 10% discount simply costs you "10 margin points" — the Margin with Discount mode above calculates the true post-discount margin directly.
Sales tax and VAT are collected on top of your selling price and passed through to the tax authority — they don't change your underlying profit margin, but they do change the final gross price your customer actually pays. Calculating a net (pre-tax) selling price from your cost and desired margin first, then adding tax on top, keeps these two calculations properly separated. This is exactly the two-step process the Margin + Tax/VAT mode above performs: it finds your net selling price from cost and margin, then applies the tax rate to show the final gross price the customer sees.
Gross margin looks only at revenue minus the direct cost of goods sold (COGS) — the raw cost of producing or acquiring what you sell — without factoring in operating expenses like rent, salaries, or marketing. Net profit margin goes further, subtracting all operating expenses and taxes as well, giving a more complete picture of overall profitability. The Gross Margin mode above calculates the company-level version of this metric directly from total revenue and total COGS, answering "what is gross margin" and "gross margin formula" searches with the exact figure investors and analysts look at first when assessing a company's core profitability.
There's no single universal answer — target margins vary enormously by industry, business model, and market conditions. E-commerce and retail businesses commonly operate on margins in the 10–30% range, while luxury goods, software, and certain service businesses can sustain margins of 60–80% or more due to lower relative production costs. Grocery and commodity businesses, by contrast, often run on razor-thin single-digit margins, compensating with high sales volume. This is why comparing your margin against industry benchmarks and direct competitors matters far more than comparing it to a generic "good margin" number.
Retailers and e-commerce sellers use margin calculations to price every product they sell. Manufacturers use them to evaluate whether a production line remains profitable as material costs change. Finance teams and investors use gross and net margin figures to compare a company's profitability against competitors and industry benchmarks. Sales teams use margin-and-discount calculations to know how far they can negotiate on price before a deal stops being profitable. And anyone running a side business or freelance operation uses the same core margin formula to make sure their pricing actually covers costs and leaves room for genuine profit.
Four simple steps take you from cost and price to a verified margin.
Select basic margin solving, margin-to-markup conversion, discount impact, tax/VAT, or company gross margin.
Provide cost, revenue, or margin — whichever two you already have.
The calculator applies the correct margin formula instantly, solving for whatever's missing.
See margin, profit, markup, or gross price together, with the formula used shown clearly.
The core equations behind every calculation mode on this page.
Profit Margin. Profit expressed as a percentage of revenue (selling price).
Revenue From Cost & Margin. Finds the selling price needed for a target margin.
Margin to Markup. Converts a margin percentage into the equivalent markup percentage.
Margin With Discount. The true margin remaining after applying a discount.
Company Gross Margin. The same core formula applied at the whole-company level.
Eight real calculations, shown with every step.
An $80-cost item sold for $100 delivers a 20% profit margin.
To achieve a 25% margin on an $80-cost item, it needs to sell for about $106.67.
A 20% margin corresponds to a 25% markup on the same $80/$100 item — the two numbers describe the identical profit, just relative to different bases.
An 11% markup corresponds to just under a 10% margin.
A 10% discount on a 30%-margin item drops the true margin to about 22.2%, not simply 20%.
The customer pays a $108 gross price, but the business's actual margin is still calculated on the $100 net price, not the tax-inclusive total.
A company with $1M in revenue and $620K in cost of goods sold reports a 38% gross margin.
A $150 item sold at a 40% margin implies the underlying cost was $90.
Margin-to-markup conversions and typical margin ranges by industry.
| Margin | Equivalent Markup |
|---|---|
| 10% | 11.1% |
| 20% | 25.0% |
| 30% | 42.9% |
| 50% | 100.0% |
| Business Type | Typical Margin |
|---|---|
| Grocery / Commodity Retail | 1% – 5% |
| General E-Commerce / Retail | 10% – 30% |
| Restaurants | 3% – 9% |
| Software / SaaS | 60% – 85% |
| Luxury Goods | 60% – 80% |
| Discount Applied | Resulting Margin |
|---|---|
| 0% | 30.0% |
| 10% | 22.2% |
| 20% | 12.5% |
| 30% | 0.0% |
Built for anyone who needs an accurate pricing or profitability figure fast — not just a rough estimate.
Solve for margin, convert margin to markup, model discounts, add tax, and check company gross margin — all in one place.
Every mode recalculates live using the exact margin formula, not a rounded shortcut.
Find cost, revenue, or margin from whichever two values you already know.
Never confuses margin (based on revenue) with markup (based on cost) — a common and costly pricing mistake.
Covers discounting, sales tax and VAT, and company-level gross margin, not just a single simplified formula.
A fully responsive layout means the same accurate tool works on desktop, tablet, and mobile.
Real business situations where this exact calculation runs every day.
Setting product prices that hit a target profit margin on every item sold.
Checking whether a product line stays profitable as material and labor costs change.
Comparing companies' gross and net margins to assess profitability and efficiency.
Knowing exactly how far a discount can go before a deal stops being profitable.
Separating net selling price and margin from the tax added on top for the customer.
Making sure service or product pricing actually covers costs and leaves real profit.
Avoid these classic errors when calculating margin and pricing.
Margin is profit as a percentage of revenue; markup is profit as a percentage of cost — using one where you meant the other changes your actual price.
Because margin is based on revenue, which shrinks with a discount, the true margin impact is larger than the discount percentage alone.
Sales tax and VAT are collected on behalf of a tax authority and should be excluded from your margin calculation, which is based on your net selling price.
Gross margin only subtracts direct cost of goods sold; net margin also subtracts operating expenses and taxes — they tell very different stories.
Margin and markup formulas require percentages in decimal form (20% = 0.20) — plugging in whole numbers directly produces a wrong result.
Typical "good" margins vary enormously by industry — comparing a grocery margin to a software margin isn't a meaningful comparison.
A healthy gross margin can still hide an unprofitable business once operating expenses are factored in at the net margin level.
Rounding a margin or cost figure before the final calculation can shift the resulting price or margin meaningfully.
Straight answers to the most common questions about profit margin.
Subtract cost from revenue to find profit, then divide by revenue and multiply by 100: Margin = (Revenue − Cost) ÷ Revenue × 100.
Margin is profit as a percentage of revenue (selling price); markup is profit as a percentage of cost — the same dollar profit gives two different percentages.
Markup = Margin ÷ (1 − Margin), using decimal form — or use the Margin ↔ Markup mode above for an instant conversion.
Divide your cost by (1 − target margin, as a decimal) — the Solve Margin mode above does this automatically.
New Margin = (Old Margin − Discount) ÷ (1 − Discount) — the margin drop is larger than the discount percentage alone, since revenue also shrinks.
Gross margin is revenue minus cost of goods sold (COGS), divided by revenue — a company-level profitability measure that excludes operating expenses.
It varies significantly by industry — general retail commonly runs 10–30%, while software and luxury goods can exceed 60%, and grocery margins are often in the low single digits.
No — margin is calculated on the net selling price before tax; tax is added on top and passed through to the tax authority.
Yes, use the Solve Margin mode above: Cost = Revenue × (1 − Margin).
Yes, it applies the standard finance formulas for margin, markup, discount, and gross margin used across business and accounting.
Yes, the calculator and every calculation mode on this page are completely free to use, with no signup required.
Yes, the entire page — including the calculator and tables — is fully responsive and works on phones and tablets.
Yes, it's designed to help price individual products or services just as easily as it handles company-level gross margin.
Gross margin subtracts only direct cost of goods sold; net margin also subtracts operating expenses and taxes, giving a fuller profitability picture.
Yes, use the Copy Results button to copy a plain-text summary, or Share to send your results directly.
Calculate profit margin, convert between margin and markup, model discounts and tax, and check gross margin using this professional Margin Calculator.