Smekys
Ad Space

Profit Margin Calculator

Free profit margin calculator: enter revenue and cost of goods sold to see gross profit, profit margin %, and markup. Margin vs markup explained.

Enter Values

$

Total sales or revenue for the product or period.

$

Direct costs to produce or source what you sold — materials, labor, and wholesale purchase price.

units

How many units those revenue and cost figures cover. Set to 1 for a single transaction; raise it to see per-unit price, per-unit cost, and per-unit profit.

Result

Gross Profit (Total)
$100.00
Profit Margin
40%
Markup
66.67%
Revenue per Unit
$250.00
Cost per Unit
$150.00
Gross Profit per Unit
$100.00

Knowing your profit margin tells you what percentage of every dollar of sales actually turns into profit after you pay the cost of what you sold. This calculator takes two numbers — your revenue and your cost of goods sold (COGS) — and instantly gives you three figures: gross profit, profit margin, and markup. It also makes the difference between margin and markup explicit, because the two are constantly confused even by experienced buyers and sellers. If you know how many units those totals cover, enter that number as well and the calculator breaks the totals into per-unit price, per-unit cost, and per-unit profit.

Type your revenue and cost into the boxes below. The result card updates immediately, so you can experiment with different price points, supplier quotes, and discounts to see how each change affects your bottom line.

How to Use

  1. Enter your Revenue — the total amount you received (or plan to charge) for the product or service. This is the sales price, not the profit.
  2. Enter your Cost of Goods Sold (COGS) — the direct cost to produce or source what you sold. For a reseller this is the wholesale purchase price; for a maker it is materials plus the direct labor that went into the item. Do not include rent, marketing, or salaries here — those are operating expenses, not COGS.
  3. Enter Units Sold only if your revenue and cost figures cover multiple items. Leave it at 1 for a single transaction. Setting it to your actual unit volume reveals the per-unit price, per-unit cost, and per-unit profit alongside the totals.
  4. Read the result card: Gross Profit is the dollar amount left after subtracting cost from revenue; Profit Margin is that profit as a percentage of revenue; Markup is the profit as a percentage of cost.
  5. To test pricing, raise or lower the revenue figure and watch the margin move. To test a supplier quote, change the cost and compare how much margin a cheaper supplier restores.
  6. Remember that profit margin is always a percentage of the selling price, while markup is always a percentage of the cost. They describe the same gap from two different vantage points.

The Profit Margin Formula

Gross profit margin uses this standard formula, the same one published by Investopedia, Xero, Shopify, and Omni Calculator:

Profit Margin = (Revenue − Cost) / Revenue × 100

Where:

  • Revenue is the total sales amount.
  • Cost is the cost of goods sold.
  • Revenue − Cost is your gross profit in dollars.

For example, if you sell an item for $250 and it cost you $150, your gross profit is $100. Divide that $100 by the $250 revenue and multiply by 100, and your profit margin is 40% — meaning 40 cents of every sales dollar is gross profit.

Markup uses the same $100 profit but divides it by the $150 cost instead:

Markup = (Revenue − Cost) / Cost × 100

So the markup on that same item is $100 / $150 × 100 = 66.7%. Notice that the markup percentage (66.7%) is larger than the margin percentage (40%) even though the dollar profit is identical. This gap is the source of countless pricing mistakes: quoting a "50% markup" sounds generous but produces a much thinner margin than most people expect.

If your cost is zero, the margin is 100% and the markup is undefined (there is no cost base to divide by). If your revenue is zero, the margin cannot be calculated, which is why the calculator asks for a positive revenue figure.

When you enter a unit count, three per-unit figures fall out on top of the totals:

  • Revenue per Unit = Revenue ÷ Units Sold
  • Cost per Unit = COGS ÷ Units Sold
  • Gross Profit per Unit = Gross Profit ÷ Units Sold

Margin and markup percentages are unchanged by the unit count — they are ratios — but the per-unit dollars are what you compare against competitor price points and against your own per-unit fixed costs.

Margin vs Markup: Why the Difference Matters

The two numbers answer different questions:

  • Margin asks: "Of every dollar I sell, how much do I keep?" It is measured against the price you charge.
  • Markup asks: "How much did I add on top of my cost to set my price?" It is measured against what you paid.

Because margin is always a smaller number than markup on the same transaction, mixing them up leads to underpricing. A common error is applying a "target margin" as if it were a markup. If you want a 40% margin, you cannot simply mark cost up by 40% — that yields only a 28.6% margin. To price from a desired margin instead, use the reverse formula:

Selling Price = Cost / (1 − Target Margin)

For a $150 cost and a 40% target margin, the correct price is $150 / (1 − 0.40) = $250. Working backward this way keeps your pricing honest.

Examples

Example 1 — A retail reseller. A boutique buys a jacket for $60 and sells it for $100. Revenue is $100, cost is $60, gross profit is $40. The profit margin is $40 / $100 = 40%, and the markup is $40 / $60 = 66.7%. The owner now knows that a proposed 20% store-wide sale drops the price to $80, and the margin falls from 40% to 25% — a much steeper drop than the "20% off" headline suggests.

Example 2 — A manufacturer quoting a big order. A factory quotes a component that costs $1,500,000 to produce and $2,500,000 in sales. Gross profit is $1,000,000, the profit margin is 40%, and the markup is 66.7%. On seven-figure orders, even a one-percentage-point margin shift is worth tens of thousands of dollars, so the calculator's large-value handling keeps the numbers precise at scale.

Example 3 — Break-even and loss. If revenue equals cost ($100 and $100), gross profit is $0, the profit margin is 0%, and the markup is 0% — you break even. If cost exceeds revenue, both margin and markup go negative, signaling a loss on every unit sold. Enter a negative or zero revenue figure and the calculator flags it rather than returning a misleading result.

FAQ

What is a good profit margin?

A "good" margin depends heavily on the industry. Grocery and discount retail run on thin margins of 2–5%, while software, luxury goods, and consulting often enjoy margins of 60–80%. As a rough rule of thumb, a net profit margin above 10% is considered healthy for many general businesses, above 20% is strong, and below 5% is tight. Compare yourself against competitors in your own sector rather than a universal number.

How do I calculate profit margin?

Subtract your cost of goods sold from revenue to get gross profit, then divide that profit by revenue and multiply by 100. For example, revenue of $250 minus cost of $150 gives $100 profit; $100 divided by $250 equals 0.40, or a 40% profit margin. This calculator performs that division automatically the moment you type both figures.

What is the difference between margin and markup?

Margin is profit as a percentage of the selling price; markup is profit as a percentage of the cost. On the same $100 profit from a $250 sale that cost $150, margin is 40% while markup is 66.7%. Margin answers "what share of the price do I keep?" and markup answers "how much did I add onto my cost?" Mixing the two up is a leading cause of underpricing.

How do I set a price from a target margin?

Do not multiply your cost by the target margin percentage — that calculates a markup, which is different. Instead divide the cost by (1 minus the target margin). For a $150 cost and a desired 40% margin, the price is $150 / (1 − 0.40) = $250. This reverse calculation guarantees the margin you actually want.

Is gross profit margin the same as net profit margin?

No. Gross profit margin subtracts only the cost of goods sold. Net profit margin subtracts all expenses, including rent, payroll, marketing, taxes, and interest. A business can show a healthy gross margin of 40% and still lose money at the net level if operating costs are high. This calculator computes gross margin; track net margin separately once overhead is included.

What does a negative profit margin mean?

A negative margin means your cost of goods sold is higher than your revenue — you are losing money on every unit you sell. It often signals a pricing problem, a supplier quote that is too high, or a product line that needs to be repriced or dropped. Entering a negative or zero revenue figure in this calculator returns an error rather than a meaningless result.

Why would I enter the number of units sold?

Most people run this calculator for a single transaction, so units sold stays at 1 and the per-unit figures match the totals. The field becomes useful when you have monthly or batch totals: if your shop did $25,000 of revenue and spent $15,000 on COGS across 1,000 units, enter 1,000 for units sold and the calculator reveals that you are clearing $10 per unit on a $25 price — a number you can directly compare against your fixed overhead per unit and against competitor pricing.

Disclaimer

This profit margin calculator is provided for informational purposes only and does not constitute financial, accounting, tax, or legal advice. Results are based solely on the revenue and cost figures you enter and use gross profit (before operating expenses), so they will differ from your net profit margin. Figures are approximations; always consult a qualified accountant or financial advisor for decisions about your business pricing, taxes, and profitability.

Related Calculators

Disclaimer

Results are estimates for illustration only. Verify important figures independently.