Profit Margin Calculator

Enter your cost and selling price to see the profit margin, gross profit, and the markup it equals — margin and markup side by side. Or switch the known value to solve for the price from a target margin. Pricing up from cost instead? Use the markup calculator.

How to calculate profit margin

Profit margin is your gross profit as a share of the selling price: margin = (price − cost) ÷ price. Sell something for $55 that cost you $22, and the $33 profit is $33 ÷ $55 = 60% of the price — a 60% margin. It's the answer to "of every dollar a customer pays me, how much is profit?" Because it's measured against the price rather than the cost, margin can never reach 100% — more on why below.

To work backward from a target margin, divide the cost by one minus the margin: price = cost ÷ (1 − margin). Want a 60% margin on that same $22 cost? $22 ÷ 0.40 = $55 — the same numbers, just solved in the other direction. Set the known value above to "Profit margin %" and the calculator does this for you.

Why profit margin can never reach 100%

Margin is capped in a way markup isn't, and the reason is built into the formula. Margin = profit ÷ price, and price is always cost plus profit — so profit could only equal the full price if the cost were zero. Push the cost toward zero and margin climbs toward 100% without ever touching it: a $1 cost on a $100 price is already a 99% margin; a one-cent cost on that same $100 price is a 99.99% margin. There's no amount of shrinking the cost that gets you all the way there unless it's genuinely nothing.

Markup doesn't have that ceiling, because it's measured against the smaller number — the cost — instead of the larger one. The full relationship between the two, with worked examples, is on the markup calculator.

Gross margin vs operating margin vs net margin

This calculator computes gross margin — the profit on a single sale, measured against what the item or service cost you directly. It's the number retailers and service businesses use to price day to day, and it's the starting point for two other margins you'll see further down a full income statement.

Operating margin subtracts a business's operating expenses — rent, payroll, marketing, software — from revenue before dividing, so it always comes in lower than gross margin. Net margin goes further still, subtracting interest, taxes and every other expense, landing on the figure that reflects what the business actually keeps. A retailer might run a 45% gross margin on the shelf but a 5% net margin once payroll and rent are accounted for; a subscription software business can carry a 75%+ gross margin because there's little cost of goods once the product is built, while running a much thinner net margin while it's still spending to grow. None of these numbers is "right" on its own — gross margin tells you whether a single sale is profitable before the business's fixed costs even enter the picture.

Reading margin off a P&L

On an income statement, gross margin sits right at the top: revenue minus cost of goods sold (COGS), divided by revenue. A line showing $180,000 in revenue and $72,000 in COGS has a gross profit of $108,000 and a gross margin of $108,000 ÷ $180,000 = 60% — the same formula this calculator runs on a single sale, just scaled up to a full reporting period.

The cost figure inside COGS is narrower than it looks. It typically covers materials, direct labor and the wholesale cost of anything resold — but not rent, marketing, admin salaries or interest. Those show up further down the statement, which is why gross margin is always the highest of the margin figures on the page, and net margin, at the very bottom, is the lowest.

Worked example: pricing a project to hit a margin target

A consulting firm invoices a client $12,000 for a project that cost $4,500 in contractor fees. The gross profit is $7,500, and the margin is $7,500 ÷ $12,000 = 62.5% — a strong number for project work with little material cost behind it.

Now say the same firm is scoping a new project with a $6,000 cost and wants to hold a 70% margin this time, not just match the last one. Solve for price: $6,000 ÷ (1 − 0.70) = $6,000 ÷ 0.30 = $20,000. Check it: ($20,000 − $6,000) ÷ $20,000 = 70%. More than three times the cost feels aggressive until you notice a 70% margin is a bigger ask than it sounds — it corresponds to a 233% markup. Set "Also known" to Profit margin % above and enter 70 to see this solved directly.

Margin to markup — quick conversion

The same profit, expressed the other way (markup = margin ÷ (1 − margin)):

Profit marginEquivalent markup
10%11.1%
15%17.6%
20%25.0%
25%33.3%
30%42.9%
40%66.7%
50%100.0%
60%150.0%
70%233.3%
80%400.0%
90%900.0%

Notice how fast the markup climbs as margin approaches 100% — that's the ceiling from the section above, in numbers. Reverse of this table — markup to margin — is on the markup calculator.

Common questions

How do you calculate profit margin?

Margin = (selling price − cost) ÷ selling price × 100. Something that costs $22 and sells for $55 makes $33 profit, which is $33 ÷ $55 = 60% of the price — a 60% margin. Margin is always measured against the price, not the cost.

What's the difference between profit margin and markup?

Same profit, different base. Margin is profit ÷ price; markup is profit ÷ cost. Markup is always the larger percentage of the two, since it's divided by the smaller number. The full breakdown, with worked examples, is on the markup calculator.

Why can't margin reach 100%?

Margin = profit ÷ price, and price is always cost plus profit — so profit could only equal the full price if the cost were zero. Margin climbs toward 100% as cost shrinks, but never touches it unless the cost genuinely is nothing.

How do I find the price from a target margin?

Price = cost ÷ (1 − margin). For a 70% margin on a $6,000 cost: $6,000 ÷ 0.30 = $20,000. Set "Also known" to Profit margin % to solve it directly.

What's the difference between gross, operating and net margin?

This calculator computes gross margin — profit on a single sale before a business's other costs. Operating margin subtracts costs like rent and payroll; net margin subtracts everything, including interest and taxes. Gross margin is always the highest of the three.