Margin Calculator

Margin Calculator
Business & Pricing

Margin Calculator

Please enter a valid cost and selling price (selling price should generally be greater than zero).
Gross Profit Margin
Markup
Profit
Cost
Revenue
Disclaimer: This calculator computes gross profit margin and markup using standard pricing formulas based on the cost and price you enter. It does not account for taxes, overhead, shipping, payment processing fees, or other business costs. It is provided for general informational purposes only and is not financial or business advice.

Margin Calculator: Set Prices Correctly and Stop Confusing Margin With Markup

Quick answer: A margin calculator finds your profit margin — the percentage of your selling price that’s actual profit — using the formula Margin = (Price − Cost) / Price × 100. It’s frequently confused with markup, which measures profit against cost instead of price, and mixing the two up is one of the most common pricing mistakes small business owners make.

If you’ve ever set a price by simply adding a flat percentage to your cost and ended up with a lower profit margin than you expected, you’ve run into the single most common pricing mistake in small business — confusing margin with markup. A margin calculator solves this by clearly separating the two concepts and giving you the exact selling price needed to hit a target profit margin, rather than a target markup. Below we break down both formulas, show exactly where they diverge, and walk through several worked examples.

Margin vs. Markup: The Confusion, Explained

Margin and markup are two different ways of expressing the same underlying profit, which is exactly why they’re so easy to mix up. Margin and markup are related but distinct concepts that both measure the difference between the price you receive for an item and the cost you paid to obtain it — the difference is simply which number that difference gets divided by.

  • Gross margin = (Price − Cost) / Price
  • Markup = (Price − Cost) / Cost

Since price is always higher than cost (assuming you’re profitable), the markup percentage will always be larger than the margin percentage for the same dollar amount of profit — a distinction that trips up even experienced business owners, since a “50% markup” and a “50% margin” produce two completely different selling prices from the same cost.

The Margin Formula

Profit Margin (%) = [(Selling Price − Cost) / Selling Price] × 100

Rearranged to solve for selling price when you know your cost and target margin:

Selling Price = Cost / (1 − Target Margin)

Worked Example #1: Calculating Margin From Known Price and Cost

You buy an item for $80 and sell it for $100.

Margin = (100 − 80) / 100 × 100 = 20%

Markup = (100 − 80) / 80 × 100 = 25%

Notice these two numbers — 20% margin and 25% markup — describe the exact same $20 profit on the exact same sale, just expressed relative to two different bases.

Worked Example #2: Setting a Price to Hit a Target Margin

You want a 15% profit margin on a $100 cost item. A common mistake is multiplying $100 by 1.15 to get $115 — but that actually produces roughly a 13% margin, not 15%, once you check the math ($15 / $115 ≈ 13%).

The correct approach uses the margin formula rearranged for price:

Selling Price = Cost / (1 − Margin) = 100 / (1 − 0.15) = 100 / 0.85 ≈ $117.65

Checking: ($117.65 − $100) / $117.65 ≈ 15% — correct. This example illustrates a rule worth remembering: to hit a target margin, the markup percentage you apply must always be greater than the margin percentage itself.

Worked Example #3: A Large Construction Job

Suppose a $100,000 sale price needs to reflect a 20% margin, not a 20% markup — a distinction that matters enormously at this scale.

20% markup version: Cost × 1.20 = $100,000 → Cost = $83,333.33, profit = $16,666.67 20% margin version: Profit = 20% × $100,000 = $20,000 → Cost = $80,000

That’s a $3,333.33 difference in profit on the exact same $100,000 sale, purely from confusing which base — cost or price — the 20% applies to. On larger transactions like real estate, construction, or wholesale deals, this exact mix-up can mean thousands of dollars in miscalculated profit.

Converting Between Margin and Markup

If you know one and need the other, these conversion formulas eliminate the guesswork:

Markup = Margin / (1 − Margin)

Margin = Markup / (1 + Markup)

For example, a 25% markup converts to a margin of 0.25 / 1.25 = 20% margin — matching the $80/$100 example above exactly.

Step-by-Step: How to Use a Margin Calculator

  1. Choose your calculation mode: find margin from price and cost, or find price from cost and target margin.
  2. Enter your cost (what you paid to acquire or produce the item).
  3. Enter your selling price (if calculating margin), or your target margin percentage (if calculating price).
  4. Review the output: profit margin percentage, dollar profit, and (if applicable) the required selling price.
  5. Double-check against markup if you’re used to thinking in markup terms, since the two numbers will never match for the same profit amount.

Common Mistakes People Make

  • Applying a markup percentage when a margin target was intended, which consistently under-prices products relative to the actual profit goal — as shown in Example #2 above.
  • Assuming margin and markup are interchangeable terms, when they’re mathematically distinct and only equal to each other when both are 0%.
  • Forgetting that markup is always larger than margin for the same profit dollar amount, so a “matching” markup and margin percentage (like both set to 20%) will never represent the same actual profit.
  • Ignoring additional costs beyond COGS (shipping, returns, transaction fees, discounts) when calculating a “true” operating margin, since gross margin alone can overstate real profitability once these are factored in.
  • Not distinguishing gross margin from net margin, since gross margin only accounts for cost of goods sold, while net margin accounts for all operating expenses, taxes, and interest as well.

Frequently Asked Questions

What is the difference between margin and markup?

Margin is profit expressed as a percentage of the selling price, while markup is profit expressed as a percentage of the cost — for the same dollar profit, markup will always be a larger percentage than margin.

How do I calculate a 20% profit margin?

Divide your cost by (1 minus the target margin as a decimal): Selling Price = Cost / (1 − 0.20) = Cost / 0.80, which ensures the resulting profit is exactly 20% of the final selling price.

Why is my markup percentage always higher than my margin percentage?

Because markup is calculated against the smaller number (cost) while margin is calculated against the larger number (selling price), so the same dollar amount of profit represents a bigger percentage of cost than it does of price.

What’s a good profit margin for a small business?

Typical gross margins vary widely by industry, but averages across industries tend to fall around the mid-30s percent for gross margin and high single digits for net margin, though acceptable margins depend heavily on your specific sector, competition, and cost structure.

Should I price my products using margin or markup?

Most finance and accounting professionals recommend thinking in terms of margin when setting prices, since margin directly tells you what percentage of each sale is profit, which is usually the number that matters most for financial planning and comparing profitability across products.

Related Calculators

Conclusion

A margin calculator exists to solve one very specific, very common pricing mistake: treating margin and markup as if they were the same number, when they’re calculated against completely different bases. Whether you’re pricing a $20 retail item or a $100,000 construction contract, using the correct margin formula — Selling Price = Cost / (1 − Target Margin) — ensures your actual profit percentage matches what you intended, rather than falling short the way a flat markup calculation often does. Run your own cost and target margin through the formulas above before your next pricing decision.