Margin Calculator
Calculate profit margin, markup, and gross profit from cost and selling price. Or find the selling price needed to achieve a desired profit margin.
The cost to produce or purchase the item.
The price at which you sell the item.
The cost to produce or purchase the item.
The profit margin percentage you want to achieve.
Margin & Markup Formulas
Margin and markup are often confused but measure different things. Margin is profit as a percentage of the selling price (revenue), while markup is profit as a percentage of the cost price. A 25% markup equals a 20% margin. Understanding this distinction is critical for pricing decisions and financial reporting.
How to Use the Margin Calculator
Choose Your Calculation Mode
Use "Calculate Margin" to find the margin from cost and selling price. Use "Find Selling Price" to determine what price you need to charge to hit a target margin.
Enter Your Values
For margin calculation, enter the cost price and selling price. For selling price calculation, enter the cost price and your desired margin percentage.
Click Calculate
Get instant results showing profit margin, markup, gross profit, and a visual breakdown of cost vs. profit in the selling price.
Analyze the Breakdown
The visual bar shows what portion of the selling price goes to cost and what portion is profit. Use this to understand your pricing structure at a glance.
Example Calculation
Cost 80, Selling Price 100
Given:
- Cost Price = 80.00
- Selling Price = 100.00
Step 1: Calculate Gross Profit
Gross Profit = 100.00 − 80.00 = 20.00
Step 2: Calculate Profit Margin
Margin = (20.00 / 100.00) × 100 = 20.00%
Step 3: Calculate Markup
Markup = (20.00 / 80.00) × 100 = 25.00%
Result: Margin = 20.00% | Markup = 25.00%
Gross Profit = 20.00
Of every 1.00 in revenue, 0.80 covers cost and 0.20 is profit.
Reverse: What selling price gives a 20% margin on 80 cost?
Selling Price = 80 / (1 − 0.20) = 80 / 0.80 = 100.00
Understanding the Results
Profit Margin
The percentage of revenue that is profit. A 20% margin means for every 1 of revenue, 0.20 is profit and 0.80 covers costs. This is the key metric in financial statements and investor reports. Higher margins indicate greater profitability and pricing power.
Markup
The percentage added on top of cost to get the selling price. A 25% markup on an 80 cost means you add 20 to get 100. While margin measures profitability relative to revenue, markup measures how much you mark up above cost. They are related but not interchangeable.
Gross Profit
The absolute dollar amount of profit per unit before deducting operating expenses, taxes, and interest. Gross profit = Revenue − Cost of Goods Sold (COGS). This funds all other business operations.
Margin vs. Markup — Don't Mix Them Up
A common mistake is using markup when you mean margin. If you want a 20% profit margin, you don't add 20% to cost (that gives 16.67% margin). You divide cost by 0.80. This calculator handles both correctly and shows you the conversion.
Key Definitions
Profit Margin
Profit expressed as a percentage of selling price (revenue). Measures how much of each dollar of revenue is actual profit.
Gross Margin
Revenue minus cost of goods sold, divided by revenue. Reflects profitability before operating expenses, taxes, and interest.
Markup
The amount added to cost price to determine selling price, expressed as a percentage of cost. Used primarily for pricing decisions.
Cost of Goods Sold
The direct costs of producing goods or services sold. Includes materials, labor, and manufacturing costs. Does not include indirect expenses.
Gross Profit
Revenue minus cost of goods sold. The profit before deducting operating expenses, taxes, depreciation, and interest.
Net Margin
Profit after all expenses (operating, taxes, interest) divided by revenue. Lower than gross margin but shows true bottom-line profitability.
Average Profit Margins by Industry
| Industry | Gross Margin | Net Margin |
|---|---|---|
| Software / SaaS | 60–80% | 15–25% |
| Pharmaceuticals | 60–75% | 15–20% |
| Consulting | 40–60% | 15–25% |
| Manufacturing | 15–30% | 3–8% |
| Retail | 20–30% | 2–5% |
| Restaurants | 55–65% | 3–9% |
| Grocery | 20–25% | 1–3% |
* Ranges are approximate and vary by company, market conditions, and business model.
Frequently Asked Questions
Margin:
=(B1-A1)/B1 then format as percentage.Markup:
=(B1-A1)/A1 then format as percentage.Gross Profit:
=B1-A1Selling Price from margin (margin in C1):
=A1/(1-C1)Related Calculators
Markup Calculator
Calculate markup percentage from cost and selling price.
Profit Calculator
Calculate profit from revenue and total costs.
ROI Calculator
Calculate return on investment for any project or asset.
Break-Even Calculator
Find the break-even point for your business.
Commission Calculator
Calculate sales commission from revenue and rate.
Conversion Rate Calculator
Calculate conversion rate from visitors and conversions.
Budget Calculator
Create and manage your budget effectively.
Hourly Rate Calculator
Calculate your ideal hourly rate from salary.