Margin Calculator
Use our free margin calculator to calculate profit margin, gross profit, revenue, cost, and markup for any product or business. Enter any two known values, and this gross margin calculator finds the remaining figures instantly.
How to Use This Margin Calculator
Using this gross margin calculator is simple:
- Enter any two of the following values (cost, revenue, profit, or margin percentage).
- Click Calculate to find all remaining values, including markup, instantly.
- To find the required selling price, enter your cost and desired margin.
- To find the maximum cost, enter your revenue and desired margin.
What Is a Margin Calculator?
A margin calculator is an online tool that calculates the profit margin of a product or business based on its cost, revenue, and profit. It uses the profit margin formula to show you how much of your revenue is kept as profit after covering costs.
People use a profit margin calculator to determine product prices, assess business profitability, and compare performance across different products or time periods. Knowing your margin helps you understand whether your pricing strategy is working and where adjustments are needed.
This gross profit calculator works for any product, service, or business and lets you calculate margin from any two of the following values: cost, revenue, profit, or markup.
Key Definitions
Before using the margin formula, it helps to understand the four main terms this calculator works with.
Cost is the amount spent to produce or purchase a product.
Revenue is the amount received from selling the product. It is also called the selling price or sales price.
Profit is the amount left after subtracting costs from revenue.
Margin is the percentage of revenue that is kept as profit. It shows how much profit is made for every dollar of revenue.
Markup is the percentage added to the cost to arrive at the selling price. It shows how much profit is made for every dollar of cost.
Profit Margin Formula
The standard formula used to calculate profit margin is:
Since Profit = Revenue − Cost, the formula can also be written as:
How to Calculate Profit Margin
Example: A product costs $80 to make and sells for $100.
- Step 1: Find the profit: 100 − 80 = $20
- Step 2: Divide profit by revenue: 20 ÷ 100 = 0.20
- Step 3: Multiply by 100: 0.20 × 100 = 20%
The profit margin is 20%, meaning 20 cents of every dollar in revenue is profit.
How to Calculate Gross Profit
Gross profit is the profit earned before deducting operating expenses, taxes, and other overheads. It is calculated directly from revenue and the cost of goods sold.
Example: A business generates $150,000 in revenue with a cost of goods sold of $90,000.
- Step 1: Gross Profit = 150,000 − 90,000 = $60,000
- Step 2: Gross Margin = (60,000 ÷ 150,000) × 100 = 40%
The business retains 40 cents of every dollar in revenue as gross profit.
How to Calculate Revenue from Margin
If you know your cost and your desired profit margin, you can work backwards to find the required selling price.
For example, If a product costs $60 and you desire a 25% profit margin, you must first convert the margin to a decimal (25% becomes 0.25). Using the formula Revenue = Cost ÷ (1 − Margin %), the calculation is 60 ÷ (1 − 0.25), or 60 ÷ 0.75, which equals $80.
Therefore, you need to sell the product for $80 to achieve a 25% profit margin.
How to Calculate Cost from Margin
If you know the selling price and the profit margin, you can find the maximum allowable cost.
To calculate the maximum allowable cost when a product sells for $120 with a desired 30% profit margin, the margin percentage must first be converted to a decimal (30% becomes 0.30). Then, using the Cost Formula: Cost = Revenue × (1 − Margin %), the calculation is $120 multiplied by (1 − 0.30), or $120 × 0.70, which results in $84. Therefore, the maximum cost to maintain a 30% margin at a $120 selling price is $84.
Margin vs Markup
Margin and markup are both based on profit, but they are calculated differently. Margin is profit as a percentage of revenue. Markup is profit as a percentage of cost.
For example, if a product costs $80 and sells for $100. First, the profit is calculated as $100 minus $80, equaling $20. To find the markup, this $20 profit is divided by the cost ($80) and multiplied by 100, resulting in a 25% markup. To find the margin, the $20 profit is divided by the revenue ($100) and multiplied by 100, resulting in a 20% margin.
The key takeaway is that the same product has a markup of 25% but a margin of only 20%, illustrating that markup is always a higher percentage than margin because it is divided by the smaller value (cost) rather than the larger value (revenue).
Margin and Markup Conversion Table
| Margin | Markup |
|---|---|
| 10% | 11.11% |
| 20% | 25.00% |
| 25% | 33.33% |
| 30% | 42.86% |
| 40% | 66.67% |
| 50% | 100.00% |
How to Calculate Margin from Markup
If you know the markup percentage and want to find the margin, use this formula:
Example: To convert a 50% markup to a margin, first convert the percentage to a decimal (0.50). Then, apply the formula Margin (%) = (Markup ÷ (1 + Markup)) × 100, which results in (0.50 ÷ (1 + 0.50)) × 100, or (0.50 ÷ 1.50) × 100, giving a final margin of 33.33%.
FAQs
What is a margin calculator?
A margin calculator is an online tool that calculates profit margin, gross profit, revenue, cost, and markup from any two known values using the profit margin formula.
What is the profit margin formula?
Profit Margin (%) = ((Revenue − Cost) ÷ Revenue) × 100. It shows what percentage of revenue is kept as profit after covering the cost of goods.
How do I calculate profit margin?
Subtract the cost from the revenue to find the profit. Divide the profit by the revenue and multiply by 100 to get the profit margin percentage.
What is gross profit?
Gross profit is the revenue remaining after subtracting the cost of goods sold. It is calculated before deducting operating expenses, taxes, and other overheads.
What is the difference between margin and markup?
Margin is profit expressed as a percentage of revenue. Markup is profit expressed as a percentage of cost. For the same product, markup is always a higher percentage than margin.
How do I find the selling price from the margin?
Use the formula: Revenue = Cost ÷ (1 − Margin %). For example, a cost of $60 with a desired 25% margin gives a selling price of $80.
What is a good profit margin?
A good profit margin varies by industry. Retail businesses often aim for 5–20%, while software and services businesses may achieve 60–80%. Higher margins generally indicate stronger financial health.
What is a GP calculator?
A GP calculator is another name for a gross profit calculator. It calculates the gross profit and gross margin of a product or business based on its revenue and cost of goods sold.
How do I convert markup to margin?
Use the formula: Margin = (Markup ÷ (1 + Markup)) × 100. For example, a 50% markup equals a margin of 33.33%.
Is this margin calculator free?
Yes. Our online profit margin calculator is completely free with no sign-up required.