Calculate Margins, Markup & Break-Even

Convert Margin to Markup (and vice versa)
Margin is profit as % of selling price. Markup is profit as % of cost. They are NOT the same. A 40% margin equals a 66.7% markup.
Type in either field - the other field updates live. Negative margin means you are selling below cost (a loss).
Result
Example Selling Price
$100.00
Profit: $40.00 from a $60 cost
Margin
40.00%
Markup
66.67%
Profit
$40.00
Margin to markup: markup = margin / (1 - margin/100). Markup to margin: margin = markup / (1 + markup/100).
Profit Margin from Cost and Price
Margin = (price - cost - extra) / price x 100. Markup = (price - cost - extra) / cost x 100. ROI = profit / (cost + extra) x 100.
Result
Profit Margin
60.00%
on a $100 price with $40 cost
Markup
150.00%
Profit / Unit
$60.00
Total Profit
$60.00
Total Revenue
$100.00
Total Cost
$40.00
ROI
150.00%
Recommended Selling Price from Cost + Margin
Base price = cost / (1 - margin/100). If tax-inclusive, divide by (1 + tax/100) so the pre-tax amount gives the requested margin.
Recommended Price
Selling Price (Tax-Exclusive)
$100.00
Customer pays tax on top of this
Tax Amount
$0.00
Customer Pays
$100.00
You Receive
$100.00
Markup
150.00%

Comparison: 3 Margin Targets

Target Margin Selling Price Profit/Unit Markup
Break-Even Analysis
Rent, salaries, insurance, utilities - paid regardless of sales
Materials, packaging, per-sale fees
Set above 0 to find units needed to hit a target margin (not just break-even)
Break-Even Result
Break-Even Units
334
units to cover fixed costs + variable costs
Break-Even Revenue
$16,700.00
Contribution Margin
$30.00
Contribution Margin %
60.00%
Margin per Unit
$30.00
Margin per Unit %
60.00%
Days to Break-Even @ 10/day
33 days
Contribution margin = price - variable cost. Break-even units = fixed costs / contribution margin. With a target margin, you need extra units above break-even.
Apply Discount and See Impact on Margin
After discount, your margin drops. The tool shows the impact and computes the MSRP needed to maintain your original margin at this discount.
Discount Impact
Before Discount (MSRP)
50.00%
margin at MSRP
After Discount
25.00%
margin on sale price
MSRP
$100.00
Discount
-$25.00
Sale Price
$75.00
Profit / Unit
$25.00
Margin Loss
-25.00 pp
MSRP for Same Margin @ This Discount
$133.33
Multi-Product Margin Portfolio
Add products with cost, price, and units sold. The tool computes weighted average margin, total revenue, and total profit across your portfolio.
Weighted margin = total profit / total revenue (not the simple average of margins).
Portfolio Result
Weighted Average Margin
0.00%
across all products
Total Revenue
$0.00
Total Cost
$0.00
Total Profit
$0.00
Total Units
0
Best Margin
-
Worst Margin
-

Per-Product Breakdown

Product Units Revenue Profit Margin

What This Tool Does

A margin calculator tells you how much profit you keep from each sale. Profit margin is the most honest number for running a business: revenue minus all costs, expressed as a percentage of what the customer paid. Markup is a related but different number - it shows profit relative to cost instead of relative to price. The two are not interchangeable, and confusing them is the most common mistake in pricing.

This tool handles every direction you might need: cost plus margin to recommended price, price plus cost to margin and markup, fixed plus variable costs to break-even units, discount applied to a margin product, and weighted average margin across a multi-product portfolio. Most free calculators only do one of these. Doing them together lets you answer real pricing questions like "what MSRP do I need to keep my margin after a 25% off sale?" or "what units do I have to sell to cover my rent?" in a single workflow.

Why AI Chatbots Struggle With Margin Math

Large language models give inconsistent answers for the same margin question across different conversations. They confuse margin and markup: 40% margin actually equals about 66.7% markup, but a chatbot asked to convert usually writes 40% for both. They mishandle tax-inclusive versus tax-exclusive pricing, especially when you want a target margin after tax. They forget break-even formulas when you mix fixed costs with per-unit variable costs. And they do not remember the previous calculation when you ask a follow-up question.

This calculator uses deterministic JavaScript math. Same inputs always produce the same outputs, down to the last decimal place. It handles edge cases including zero cost, negative margin, currency rounding, and tax layering. Your inputs persist in localStorage so a page refresh keeps your work. Open DevTools and watch the network tab: nothing leaves your device.

Frequently Asked Questions

What is the difference between margin and markup?

Margin is profit as a percentage of selling price. Markup is profit as a percentage of cost. They are not the same number. Example: cost $60, price $100, profit $40. Margin = 40 divided by 100 = 40 percent. Markup = 40 divided by 60 = 66.67 percent. A 40 percent margin equals a 66.67 percent markup, not a 40 percent markup. Most free online calculators only show one direction. This tool converts between them bidirectionally and updates both fields as you type.

How do I calculate profit margin from cost and price?

Profit margin equals (selling price minus cost) divided by selling price, multiplied by 100. For example: cost $40, price $100, profit $60, margin = 60 divided by 100 = 60 percent. The same numbers give markup = 60 divided by 40 = 150 percent. Enter the cost and selling price in the Profit Margin tab and the tool returns margin percent, markup percent, profit per unit, total profit (if you set units sold), total revenue, and ROI.

How do I calculate the selling price from cost and desired margin?

Selling price equals cost divided by (1 minus margin percent over 100). For example, cost $40 with desired 60 percent margin: price = 40 divided by (1 minus 0.60) = 40 divided by 0.40 = $100. Enter cost and margin percent in the Selling Price tab. If tax-inclusive mode is selected, the tool divides further by (1 + tax rate) so the pre-tax amount still hits the requested margin. The comparison table shows three common margin targets side by side.

How do I calculate break-even point?

Break-even units equals fixed costs divided by contribution margin per unit. Contribution margin is selling price minus variable cost per unit. Example: fixed costs $10000, price $50, variable cost $20 per unit, contribution margin $30, break-even = 10000 divided by 30 = 334 units. After 334 units, every additional unit generates pure profit. Set a target net margin above zero to find the units needed to hit that target, not just to break even.

What is a good profit margin for my business?

Industry benchmarks vary widely. SaaS software usually runs 70-85 percent gross margin. Luxury retail 50-70 percent. Restaurants 3-9 percent net because of food and labor. Grocery 1-3 percent. Clothing retail 4-13 percent. Wholesale 5-15 percent. Jewelry 40-60 percent. Electronics retail 5-15 percent. Freelance consultants 50-90 percent gross (no cost of goods). Manufacturing 5-15 percent gross. Use the industry preset buttons at the top to load a realistic starting point for your category, then adjust cost and price to match your actual situation.

How do I keep margin after a discount or sale?

Stacked discount plus margin analysis is where most pricing mistakes happen. A 25 percent discount on a 40 percent margin product drops your margin to about 22 percent, not 15 percent, because the sale price is what the customer pays and profit is fixed. To maintain 40 percent margin during a 25 percent sale, your MSRP must be 67 percent above cost. Use the Discount and Margin Stack tab: enter cost, MSRP, and discount percent. The tool shows the post-discount price, the new margin, and the MSRP you would need to keep the original margin.

How do I calculate weighted average margin across multiple products?

Weighted average margin equals total profit divided by total revenue, multiplied by 100. Do not average the individual margins - that gives wrong answers when products have different unit counts. Example: Product A sells 1000 units at 30 percent margin, Product B sells 100 units at 60 percent margin. Simple average gives 45 percent. Weighted average (using revenue weights) gives roughly 32 percent because Product A has 10x the revenue. Use the Multi-Product tab to add products with cost, price, and units sold.

Is my data private and is there a daily limit?

Your data is 100 percent private. All math runs locally in your browser using JavaScript. Nothing uploads to any server. Your inputs persist in localStorage between refreshes so a reload keeps your work, but clearing browser storage wipes them. There is no signup, no daily limit, no watermark, no tracking pixels, no advertising on the tool. You can verify this by opening DevTools and watching the Network tab while you type.

Related Tools

For pricing and finance workflows beyond margin math, try: