Margin Calculator
Enter any two fields; the rest update automatically.
References
- Profit = Revenue − Cost
- Margin (%) = 100 × Profit / Revenue
- Revenue = Cost / (1 − Margin/100)
- Cost = Revenue × (1 − Margin/100)
Note : This calculator estimates gross margin from cost, revenue, and profit. It does not include overhead, taxes, shipping, platform fees, labor, rent, advertising, discounts, refunds, or other operating expenses unless you include them in the cost value.
Use this Margin Calculator to calculate profit margin, revenue, cost, or profit from any two known values. Enter cost, margin, revenue, or profit, and the calculator estimates the missing values using standard gross margin formulas.
Reviewed by: AjaxCalculators Editorial Team
Last updated: April 26, 2026
Method source: Standard gross profit margin relationships using cost, revenue, profit, and margin percentage
Editorial standards: AjaxCalculators Editorial Policy
What This Margin Calculator Calculates
This calculator estimates:
- Cost
- Revenue
- Profit
- Margin percentage
The live tool lets you enter any two fields, then updates the remaining values automatically. This makes it useful for pricing, sales planning, product profitability, and quick business margin checks.
What Profit Margin Means
Profit margin shows what percentage of revenue remains as profit after cost is subtracted. In this calculator, margin is based on revenue, not cost.
For example, if a product sells for $100 and costs $60, the profit is $40. The margin is 40% because $40 is 40% of the $100 selling price.
This is different from markup. Margin is based on revenue, while markup is usually based on cost.
How the Margin Calculator Works
1) Profit Formula
Profit is the difference between revenue and cost.
Profit = Revenue − Cost
For example, if revenue is 150 and cost is 90:
Profit = 150 − 90 = 60
2) Margin Formula
Margin percentage is profit divided by revenue, multiplied by 100.
Margin (%) = Profit ÷ Revenue × 100
Using the same example:
Margin = 60 ÷ 150 × 100 = 40%
3) Revenue From Cost and Margin
If you know cost and target margin, the calculator can estimate the required revenue or selling price.
Revenue = Cost ÷ (1 − Margin ÷ 100)
For example, if cost is 80 and the target margin is 20%:
Revenue = 80 ÷ (1 − 20 ÷ 100)
Revenue = 80 ÷ 0.80 = 100
4) Cost From Revenue and Margin
If you know revenue and margin, the calculator can estimate cost.
Cost = Revenue × (1 − Margin ÷ 100)
For example, if revenue is 200 and margin is 35%:
Cost = 200 × (1 − 35 ÷ 100)
Cost = 200 × 0.65 = 130
5) Revenue From Cost and Profit
If cost and profit are known, revenue is calculated as:
Revenue = Cost + Profit
6) Cost From Revenue and Profit
If revenue and profit are known, cost is calculated as:
Cost = Revenue − Profit
Margin vs Markup
Margin and markup are often confused, but they are not the same.
Margin is profit divided by revenue:
Margin = Profit ÷ Revenue × 100
Markup is profit divided by cost:
Markup = Profit ÷ Cost × 100
For example, if a product costs $60 and sells for $100, the profit is $40. The margin is 40%, but the markup is 66.67%. This is why using markup when you mean margin can lead to pricing mistakes.
Gross Margin vs Net Margin
This calculator is best understood as a gross margin calculator. It uses cost, revenue, and profit from the values entered.
Gross margin usually focuses on revenue after direct cost or cost of goods sold.
Net margin usually accounts for more expenses, such as salaries, rent, software, taxes, interest, marketing, payment fees, and other operating costs.
If you want the calculator result to reflect a broader business margin, include all relevant costs in the cost field. Otherwise, the result may only show direct product or service margin.
Assumptions and Important Notes
- This calculator uses simple gross margin formulas.
- It assumes revenue, cost, and profit are entered in the same currency.
- It assumes margin is calculated from revenue, not cost.
- It does not automatically include taxes, VAT, shipping, discounts, refunds, overhead, payroll, advertising, platform fees, or payment processing fees.
- It does not calculate net profit margin unless all net-cost items are manually included in the cost value.
- A margin of 100% is not realistic when cost is greater than zero.
- A negative margin means cost is higher than revenue.
Worked Example: Find Margin From Cost and Revenue
Suppose a product costs $70 and sells for $100.
Step 1: Calculate profit
Profit = 100 − 70 = $30
Step 2: Divide profit by revenue
30 ÷ 100 = 0.30
Step 3: Convert to percentage
0.30 × 100 = 30%
So, a product with a $70 cost and $100 revenue has a $30 profit and a 30% margin.
Worked Example: Find Revenue From Cost and Target Margin
Suppose your cost is $120 and you want a 40% margin.
Step 1: Convert margin to decimal
40% = 0.40
Step 2: Subtract from 1
1 − 0.40 = 0.60
Step 3: Divide cost by the result
Revenue = 120 ÷ 0.60 = $200
Step 4: Check profit
Profit = 200 − 120 = $80
Step 5: Check margin
80 ÷ 200 × 100 = 40%
So, to earn a 40% margin on a $120 cost, the selling price or revenue should be $200.
How to Use This Margin Calculator
- Enter any two known values: cost, margin, revenue, or profit.
- Use the same currency for cost, revenue, and profit.
- Let the calculator update the missing values.
- Review the calculated margin, revenue, cost, and profit.
- Use the refresh button if you want to clear the fields and start again.
How to Interpret the Result
Cost is the amount spent to produce, buy, or deliver the item or service.
Revenue is the selling price or income received from the sale.
Profit is the amount left after subtracting cost from revenue.
Margin is the profit shown as a percentage of revenue.
A higher margin means more of each revenue unit remains as profit before any costs not included in the calculation. A lower margin means more of the revenue is consumed by cost.
When a Margin Calculator Is Useful
- setting product prices
- checking profit per sale
- calculating target selling price from cost
- comparing product profitability
- estimating service margins
- reviewing cost increases
- checking whether a discount still leaves enough profit
- planning small business pricing
Common Mistakes to Avoid
- Do not confuse margin with markup.
- Do not divide profit by cost when you want margin.
- Do not forget hidden costs such as shipping, packaging, platform fees, payment fees, labor, refunds, or discounts.
- Do not assume gross margin equals net profit margin.
- Do not use a target margin of 100% when cost is greater than zero.
- Do not compare margins across businesses without considering industry, product type, cost structure, and sales model.
- Do not rely on margin alone to judge business health; cash flow, volume, overhead, and net profit also matter.
Formula Summary
| What You Want to Find | Formula |
|---|---|
| Profit | Profit = Revenue − Cost |
| Margin percentage | Margin (%) = Profit ÷ Revenue × 100 |
| Revenue from cost and margin | Revenue = Cost ÷ (1 − Margin ÷ 100) |
| Cost from revenue and margin | Cost = Revenue × (1 − Margin ÷ 100) |
| Revenue from cost and profit | Revenue = Cost + Profit |
| Cost from revenue and profit | Cost = Revenue − Profit |
| Markup percentage | Markup (%) = Profit ÷ Cost × 100 |
References
- AjaxCalculators live Margin Calculator
- Investopedia: Gross Profit Margin definition and formula
- Investopedia: Costs excluded from gross profit margin
- Xero: Gross profit margin formula and explanation
- Omni Calculator: Profit margin calculation steps
Related Calculators
- Margin & VAT Calculator
- Profit Calculator
- VAT Calculator
- Percentage Calculator
- Percentage Change Calculator
- Percent Off Calculator
- PayPal Fee Calculator
- ROI Calculator
Business note: This calculator is for educational, pricing, and planning use only. It estimates margin from the values entered and does not provide accounting, tax, legal, financial, or business advice. Actual profitability can differ because of overhead, payroll, taxes, discounts, refunds, shipping, inventory loss, payment fees, advertising costs, VAT/GST, and other operating expenses. For official business reporting or pricing decisions, review your full cost structure or speak with a qualified accountant or financial professional.