Business & Marketing

Profit Margin Calculator — Gross Margin %, Profit & Selling Price

Turn cost and price into margin percent, dollar profit, and the price that hits your target

Profit margin is the single number that tells a US business owner how much of every sales dollar is actually profit. It's the language banks, investors, retail buyers and accountants all speak, and it's the metric you should check before you set a price, run a promotion, or take on a wholesale order. This calculator works it out four ways: from a cost and a selling price it returns your gross profit margin percent and your dollar profit; or, when you already know the margin you want, it solves for the selling price or the maximum cost that gets you there.

The core formula is short. Gross margin % = (price − cost) ÷ price × 100, and profit = price − cost. Notice the base: margin is measured against the selling price, not the cost. That one detail is the whole game, and it's exactly where margin and markup part ways (more on that below). A coffee shop that buys beans, cups and labor for $60 of cost and sells the order for $100 makes $40 of profit — a 40% margin, because $40 is 40% of the $100 the customer paid.

The reverse questions are the ones owners get wrong most often. "I want a 50% margin and my cost is $60 — what do I charge?" You do not add 50% to $60 (that's markup, and it only gets you to a 33% margin). The right move is price = cost ÷ (1 − margin) = 60 ÷ (1 − 0.50) = $120. At $120 your profit is $60, which is exactly half of the $120 selling price — a true 50% margin. Flip it the other way and the calculator answers "if I have to sell at $99 and I need a 35% margin, what's the most I can pay for the product?" → cost = price × (1 − margin) = 99 × 0.65 = $64.35.

This is gross margin — revenue minus the direct cost of goods sold (COGS). It does not subtract rent, payroll, ads, shipping you eat, or taxes; those come out of the gross margin to leave your net profit. So a healthy gross margin isn't the same as a healthy business, but a thin gross margin almost always means trouble downstream. Use this tool to price new SKUs, sanity-check a vendor quote, see whether a discount still leaves you in the black, or compare two products on the only basis that matters — how much of each sale you keep. Results are an estimate for planning, not accounting or tax advice.

Easy ⏱ 5 min Updated: 2026-06-19 ✍️ By Jeferson Bruno
📖 See also: Federal Income Tax Brackets 2025: How Much Will You Owe?

Calculator

Fill in the fields and click "Calculate" for instant results.

Result
Waiting for calculation
Fill in the fields and click "Calculate".
Transparency: below the form you'll find an explanation, formula, examples, tips, and FAQ (when available for this calculator).

📰 Formula

• Gross margin % = (Price − Cost) ÷ Price × 100
• Profit = Price − Cost
• Required price for a target margin = Cost ÷ (1 − Margin/100)
• Max cost for a target margin = Price × (1 − Margin/100)
• Margin is based on PRICE; markup is based on COST

📰 Formula

• Gross margin % = (Price − Cost) ÷ Price × 100
• Profit = Price − Cost
• Required price for a target margin = Cost ÷ (1 − Margin/100)
• Max cost for a target margin = Price × (1 − Margin/100)
• Margin is based on PRICE; markup is based on COST

🧪 Worked examples

1

Example 1

2

Example 2

3

Example 3

4

Example 4

⚠️ Common mistakes

  • Confusing margin with markup — margin divides by price, markup divides by cost.
  • Adding the margin percent to the cost (that gives markup, a lower margin).
  • Treating gross margin as net profit — it ignores rent, payroll, ads and tax.
  • Forgetting shipping, fees or returns in the cost, which inflates the margin.
  • Trying to set a margin of 100% or more, which would require an infinite price.

💡 Tips

  • To convert markup to margin: margin = markup ÷ (1 + markup). A 50% markup is a 33.3% margin.
  • Put every direct cost — product, freight-in, payment fees, packaging — into 'cost' for an honest margin.
  • If a discount drops the price below cost, the margin goes negative — you're paying customers to buy.
  • Aim your gross margin high enough to still leave a profit after rent, payroll and ads come out.
  • When a buyer dictates the retail price, use the max-cost mode to negotiate your supplier price.

Embed this calculator on your site

Copy the code below and paste it into the HTML of your site or blog.

<iframe src="https://www.calcnimbus.com/embed/profit-margin-calculator" width="100%" height="500" frameborder="0" style="border:1px solid #eee;border-radius:12px"></iframe>

❓ Frequently asked questions

How do I calculate profit margin?

Gross margin % = (selling price − cost) ÷ selling price × 100. If cost is $60 and price is $100, margin = (100 − 60) ÷ 100 × 100 = 40%.

What is the difference between margin and markup?

Both measure profit, but against different bases. Margin = profit ÷ price; markup = profit ÷ cost. A $60 cost sold at $100 is a 40% margin but a 66.7% markup — same dollar profit, different denominator.

What price do I charge to hit a target margin?

Use price = cost ÷ (1 − margin/100). For a 50% margin on a $60 cost: 60 ÷ (1 − 0.50) = $120. Do not just add 50% to the cost — that only yields a 33% margin.

How do I find the cost from price and margin?

Cost = price × (1 − margin/100). At a $99 price with a 35% target margin, the most you can pay is 99 × 0.65 = $64.35.

Is profit margin the same as net profit?

No. This tool computes gross margin — revenue minus the direct cost of goods sold. Net profit also subtracts overhead like rent, payroll, marketing, shipping and taxes, so net margin is always lower than gross margin.

What is a good profit margin for a small business?

It varies by industry. Restaurants and grocery run thin gross margins, while software and services run high ones. As a rough rule, retailers often target 40–50% gross margin so enough is left after overhead, but compare to peers in your own sector.

How do I convert a markup percentage to a margin percentage?

Margin = markup ÷ (1 + markup). A 25% markup is a 20% margin; a 50% markup is a 33.3% margin; a 100% markup is a 50% margin.

Can a profit margin be more than 100%?

No. Because margin is profit divided by price, it can approach but never reach 100% (that would mean zero cost), and it goes negative if you sell below cost. Markup, by contrast, can exceed 100%.

How do I calculate margin on multiple units?

Margin percent is the same whether you use per-unit or total figures, so enter cost and price per unit. To get total dollar profit, multiply the per-unit profit by the number of units sold.