Enter valid numbers to see your margin and markup.
Gross profit margin
–
–
Cost
–
Selling price
–
Profit
–
Markup
–
Totals
Margin Calculator
A Margin Calculator helps you determine how much profit you make from selling a product or service. By entering your selling price and cost, you can calculate your profit amount and profit margin percentage in seconds. Whether you run a small business, manage an online store, or sell products as a freelancer, understanding profit margins can help you set better prices and make smarter financial decisions.
Profit margin is an important business metric because it shows how much of your revenue remains as profit after accounting for the relevant costs. Use a margin calculator to evaluate product profitability, compare pricing options, and understand the difference between profit margin and markup.
How to Calculate Profit Margin
To calculate profit margin, subtract the cost of a product or service from its selling price to find the profit. Then divide the profit by the selling price and multiply by 100 to get the profit margin percentage.
Profit Margin Formula:
Profit Margin (%) = [(Selling Price − Cost) ÷ Selling Price] × 100
Example:
Suppose you purchase a product for $60 and sell it for $100.
- Selling price: $100
- Cost: $60
- Profit: $100 − $60 = $40
- Profit margin: ($40 ÷ $100) × 100 = 40%
This means you earn $40 in profit for every $100 in sales, before accounting for any additional expenses not included in the original cost.
A margin calculator makes this calculation easier by automatically calculating the profit amount and percentage. If your selling price is lower than your cost, the result will be a negative profit margin, indicating a loss.
Gross Margin Formula
Gross margin measures the percentage of revenue remaining after subtracting the cost of goods sold (COGS). It helps businesses understand how efficiently they produce or purchase the products they sell.
Gross Margin Formula:
total Gross Margin (%) = [(Revenue − Cost of Goods Sold) ÷ Revenue] × 100
Gross Profit = Revenue − Cost of Goods Sold
Example:
A business generates $20,000 in revenue and spends $12,000 on the goods it sells.
- Revenue: $20,000
- Cost of goods sold: $12,000
- Gross profit: $20,000 − $12,000 = $8,000
- Gross margin: ($8,000 ÷ $20,000) × 100 = 40%
The business has a gross margin of 40%, meaning it retains $0.40 in gross profit for every dollar of revenue before operating expenses, taxes, interest, and other costs.
Gross margin is particularly useful when comparing products, reviewing supplier costs, and evaluating pricing strategies. However, it does not represent the final profit a business keeps after all expenses.
A Note on Terminology
The terms profit, profit margin, gross margin, net margin, and markup are related, but they do not mean the same thing.
- Profit: The amount remaining after subtracting relevant costs from revenue.
- Profit margin: Profit expressed as a percentage of revenue.
- Gross profit: Revenue minus the cost of goods sold.
- Gross profit margin: Gross profit divided by revenue, expressed as a percentage.
- Net profit margin: Net profit divided by revenue, expressed as a percentage after applicable expenses.
- Markup: The amount added to the cost of a product, expressed as a percentage of that cost.
For example, if a product costs $80 and sells for $100, the profit is $20. The profit margin is 20% because the profit is 20% of the selling price. The markup is 25% because the profit is 25% of the original cost.
Understanding these definitions helps you choose the correct formula for your business calculations and avoid pricing mistakes.
Margin vs. Markup
Profit margin and markup both measure profitability, but they use different reference values. Margin is calculated using the selling price, while markup is calculated using the cost.
| Feature | Profit Margin | Markup |
|---|---|---|
| Calculation basis | Selling price | Product cost |
| Formula | Profit ÷ Selling price × 100 | Profit ÷ Cost × 100 |
| Main purpose | Measures profit as a share of revenue | Measures the increase over cost |
| Example | $20 profit on $100 sales = 20% | $20 profit on $80 cost = 25% |
Example:
Suppose a product costs $80 and you sell it for $100.
Profit = $100 − $80 = $20
Profit margin = ($20 ÷ $100) × 100 = 20%
Markup = ($20 ÷ $80) × 100 = 25%
The two percentages differ because they use different denominators.
How to Convert Margin to Markup
You can calculate markup from a known profit margin using this formula:
Markup (%) = [Margin (%) ÷ (100 − Margin (%))] × 100
For example, if your desired profit margin is 30%:
Markup = [30 ÷ (100 − 30)] × 100
Markup = (30 ÷ 70) × 100 = 42.86%
Therefore, a 30% profit margin requires a markup of approximately 42.86% on cost.
To convert markup to margin, use:
Margin (%) = [Markup (%) ÷ (100 + Markup (%))] × 100
These formulas are useful when setting product prices and ensuring your desired margin is not confused with your markup percentage.
Related calculators
annual income calculator
Percentage Calculator
age calculator
FAQs
What's the difference between gross and net profit margin?
Gross profit margin measures the percentage of revenue remaining after subtracting the cost of goods sold. Net profit margin measures the percentage of revenue remaining after accounting for all applicable expenses, including operating costs, interest, and taxes.
For example, if a business generates $10,000 in revenue and has $6,000 in cost of goods sold, its gross profit is $4,000 and its gross margin is 40%. If the business has another $2,500 in expenses, its net profit is $1,500 and its net profit margin is 15%.
Gross margin helps evaluate product-level profitability, while net margin gives a broader picture of overall profitability.
Can profit margin be too high?
A high profit margin is not necessarily a problem. It may indicate strong pricing power, efficient operations, low costs, or a product that customers value highly. However, an unusually high margin may also reflect temporary market conditions, limited competition, or costs that have not been fully accounted for.
Businesses should evaluate profit margins alongside customer demand, sales volume, operating expenses, and long-term competitiveness. A very high margin does not automatically mean a business is performing well in every area.
What is margin in sales?
Margin in sales refers to the percentage of sales revenue that remains as profit after subtracting the relevant costs. It shows how much profit a business earns from its sales.
Formula:
Sales Profit Margin (%) = (Profit ÷ Sales Revenue) × 100
For example, if a company generates $5,000 in sales and earns $1,000 in profit, its profit margin is:
($1,000 ÷ $5,000) × 100 = 20%
This means the company earns $0.20 in profit for every dollar of sales, based on the costs included in that profit calculation.
How do I calculate a 20% profit margin?
To calculate a 20% profit margin, divide your desired profit by 20% of the selling price or use the following pricing formula:
Selling Price = Cost ÷ (1 − Desired Margin)
Suppose your product costs $80 and you want a 20% profit margin.
Selling Price = $80 ÷ (1 − 0.20)
Selling Price = $80 ÷ 0.80 = $100
Your profit will be $20, and your profit margin will be 20% because $20 is 20% of the $100 selling price.
What is a good margin?
A good profit margin depends on the industry, business model, operating costs, competition, and product type. Some high-volume retailers operate with relatively low margins, while certain software and service businesses may achieve higher margins.
Instead of using one percentage as a universal benchmark, compare your margin with businesses in the same industry and evaluate whether it supports your operating expenses, growth plans, and financial goals. Gross margin and net margin should also be evaluated separately.
How do I calculate margin in Excel?
You can calculate profit margin in Excel by entering your selling price and cost in separate cells.
For example:
- Cell A2: Selling price, such as 100
- Cell B2: Cost, such as 60
- Cell C2: Profit margin formula
Enter this formula in cell C2:
=(A2-B2)/A2
Then format cell C2 as a percentage. Excel will display 40%.
To calculate the profit amount, use:
=A2-B2
Make sure the selling price is greater than zero. If you want to avoid a division error when the selling price is zero, use:
=IF(A2>0,(A2-B2)/A2,0)
This last formula returns zero when the selling price is zero. For financial reporting, you may prefer to display a blank or an error message instead, since a margin cannot be meaningfully calculated when revenue is zero.
How do I calculate a 10% margin?
To achieve a 10% profit margin, divide your cost by 0.90.
Formula:
Selling Price = Cost ÷ (1 − 0.10)
For example, if your product costs $45:
Selling Price = $45 ÷ 0.90 = $50
Profit = $50 − $45 = $5
Profit margin = ($5 ÷ $50) × 100 = 10%
Simply adding 10% to the cost would produce a 10% markup, not a 10% profit margin.
Are margin and profit the same?
No. Profit is the monetary amount remaining after subtracting relevant costs from revenue, while margin expresses that profit as a percentage of revenue.
For example, if a product sells for $100 and costs $70, the profit is $30. The profit margin is 30% because the profit equals 30% of the selling price.
Profit tells you how much money you earn, whereas margin helps you understand how much profit you generate relative to your sales.
How do I calculate a 30% margin?
To achieve a 30% profit margin, divide your product cost by 0.70.
Formula:
Selling Price = Cost ÷ (1 − 0.30)
Suppose your product costs $70.
Selling Price = $70 ÷ 0.70 = $100
Profit = $100 − $70 = $30
Profit margin = ($30 ÷ $100) × 100 = 30%
This approach ensures that your profit represents 30% of the selling price rather than 30% of the cost.
How do I calculate markup from margin?
To convert profit margin into markup, divide the margin percentage by the difference between 100% and the margin percentage, then multiply by 100.
Formula:
Markup (%) = [Margin (%) ÷ (100 − Margin (%))] × 100
For example, a 25% profit margin converts to this markup:
Markup = [25 ÷ (100 − 25)] × 100
Markup = (25 ÷ 75) × 100 = 33.33%
Therefore, if your target margin is 25%, you need to add approximately 33.33% to your cost to achieve that margin. This conversion is useful when determining selling prices based on a desired level of profitability.
