Profit Margin Calculator
Calculate profit margin and markup from revenue and cost.
Profit Margin Calculator
How was your experience with this tool?
Found a bug? Missing a feature? Tell us — it takes 10 seconds.
See how it works
Watch a quick simulation of this tool in action — no file needed.
How to use Profit Margin Calculator
Follow these steps — everything happens instantly in your browser.
- 1
Step 1. Enter total revenue (sales).
- 2
Step 2. Enter total cost (COGS + operating).
- 3
Step 3. See profit, profit margin %, and markup %.
Profit Margin Calculator: Margin vs Markup in One View
Why confusing margin and markup loses you money
Margin and markup are among the most frequently confused terms in business. Both describe the relationship between cost, revenue, and profit, but they use different denominators — and using the wrong one in a pricing formula can silently erode your profits. A sales rep who marks up a $70 product by 30% charges $91, earning $21 profit. But $21 on $91 revenue is only a 23% margin — not the 30% the rep thought they were making.
The distinction matters at every scale. A restaurant aiming for a 70% food cost margin (meaning 30% profit margin) that accidentally calculates a 70% markup would price its dishes far too low and bleed cash on every plate. A SaaS company targeting 80% gross margin needs to know that translates to a 400% markup — a number that sounds absurd but is mathematically correct and common in software.
This calculator gives you both figures side by side from the same two inputs: revenue and cost. Enter what you sold it for and what it cost you, and you immediately see profit in dollars, margin as a percentage of revenue, and markup as a percentage of cost. No formulas to memorize, no spreadsheet cells to wire up.
Margin vs markup at common profit levels
| Profit | Margin | Markup |
| --- | --- | --- |
| $10 on $50 revenue | 20.0% | 25.0% |
| $20 on $80 revenue | 25.0% | 33.3% |
| $30 on $100 revenue | 30.0% | 42.9% |
| $50 on $100 revenue | 50.0% | 100.0% |
| $60 on $100 revenue | 60.0% | 150.0% |
How to calculate profit margin and markup
Enter your total revenue — the selling price or total sales for the period
Enter your total cost — cost of goods sold, operating expenses, or both, depending on whether you want gross or net margin
Review the profit (revenue minus cost), profit margin (profit divided by revenue), and markup (profit divided by cost)
Use the margin percentage for financial reporting and the markup percentage for setting prices
How to sanity-check your result
A quick cross-check: if revenue is $100 and cost is $70, profit is $30, margin is 30% ($30 / $100), and markup is 42.86% ($30 / $70). You can also reverse-engineer a target price from a desired margin. For a 30% margin on a $70 cost: price = 70 / (1 - 0.30) = $100. The math confirms itself.
Common mistakes in margin and markup calculations
Using margin and markup interchangeably — 30% margin is 42.9% markup, and treating them as the same number leads to systematic underpricing
Calculating margin on cost instead of revenue — margin is always profit divided by revenue, never profit divided by cost
Mixing gross and net figures — gross margin uses only COGS while net margin includes all expenses; using the wrong cost base misrepresents profitability
Forgetting that markup can exceed 100% — a $25 profit on a $25 cost is 100% markup, which confuses people who assume percentages cap at 100
Edge cases in profitability analysis
When cost exceeds revenue, profit is negative and both margin and markup become negative numbers. The calculator handles this correctly — a negative margin indicates a loss, which is useful for evaluating unprofitable product lines before cutting them. Zero revenue produces a division-by-zero scenario for margin; the tool displays an error rather than returning infinity. For businesses with very thin margins (1-3%), small rounding differences in cost allocation can swing the result significantly.
Who uses a profit margin calculator
Small business owners pricing new products who need to ensure their margins meet industry benchmarks
E-commerce sellers comparing supplier costs against retail prices to decide which products to stock
Restaurant managers calculating food cost margins to keep menu pricing aligned with COGS targets
Investors evaluating company financials who need to quickly compute margins from reported revenue and cost figures
Frequently asked questions
Q: What is the difference between margin and markup?
A: Margin = profit / revenue. Markup = profit / cost. They share the same dollar profit but use different bases. For example, 30% margin equals 42.9% markup. Confusing the two is one of the most common pricing errors.
Q: What is a good profit margin?
A: It varies by industry. SaaS companies target 70-80% gross margin, retail runs 20-40%, restaurants operate on 3-9% net margins, and consulting firms see 20-50%. Always compare to your industry benchmark.
Q: Gross margin versus net margin?
A: Gross margin uses only COGS (cost of goods sold) in the cost field. Net margin includes all expenses — COGS, operating costs, taxes, and interest. Choose the appropriate cost figure for the metric you need.
Q: How do I set a price for a target margin?
A: Use the formula: price = cost / (1 - target margin). For a 30% margin on a $70 cost: price = 70 / 0.7 = $100. That gives $30 profit on $100 revenue, which is exactly 30% margin.
Q: Is my data uploaded?
A: No — all math runs locally in your browser.
Q: Can I calculate margin for a service business?
A: Yes. For services, cost includes labor hours, software tools, and any direct project expenses. Revenue is the client invoice amount. The same margin and markup formulas apply.
Calculate your margins now
Get instant profitability insights with the Profit Margin Calculator. For related business tools, try the Markup Calculator, Break-Even Calculator, or ROI Calculator.
Want the extended step-by-step tutorial? Read it here.
Why use this tool
Private by design
All processing happens locally in your browser. Open DevTools → Network and you'll see zero file uploads. Ever.
Instant
No upload wait, no queue, no server round-trip. Results appear the moment you drop a file.
Free & unlimited
No accounts, no watermarks, no daily caps. Use it as many times as you like, forever.
Works everywhere
Desktop, tablet or phone — every tool is responsive and installable as a PWA for offline use.
Frequently asked questions
Everything you might want to know about profit margin calculator.
❤️ This tool is free — forever.
Sharing it helps more people discover it, and ad revenue from visitors is what keeps it free. No accounts, no catch.
Markup Calculator
Find the selling price from cost and markup percentage.
Break-Even Calculator
Find the sales volume where revenue equals costs.
ROI Calculator
Total and annualized return on any investment.
Invoice Generator
Create clean invoices with line items, tax, and totals — export as text.