Profit Margin Calculator

Profit, margin and markup without mixing them up

Enter revenue or selling price and cost to calculate gross profit, profit margin and markup. Or switch modes, enter a cost and target margin, and the calculator finds the minimum selling price that reaches it.

The distinction between margin and markup is the center of the tool. They both describe the same profit, but divide it by different numbers and therefore produce different percentages.

How gross profit and margin work

Gross profit is revenue minus direct cost. If an item costs $60 and sells for $100, gross profit is $40.

Profit margin divides that $40 profit by the $100 selling price:

margin = (revenue − cost) ÷ revenue × 100

The result is 40%. In other words, forty cents of each revenue dollar remains after the entered cost.

Markup uses cost instead

Markup divides profit by cost:

markup = (revenue − cost) ÷ cost × 100

The same $60 cost and $100 price produce a 66.67% markup. That is why adding 40% to cost does not create a 40% margin. A 40% markup makes the price $84, the profit $24, and the margin only 28.57%.

When someone gives you a percentage, ask whether it is margin or markup before using it to set a price.

Pricing for a target margin

To solve backward from a target margin, rearrange the margin formula:

selling price = cost ÷ (1 − target margin)

At $60 cost and a 40% target margin, the price is $60 ÷ 0.60, or $100. The calculator rounds the answer up to the nearest cent so currency rounding does not leave the achieved margin just below the target.

A positive-cost product cannot have a 100% margin. As the target gets closer to 100%, the required price grows without limit.

What belongs in cost

A calculation is only as complete as the cost entered. A product-level gross margin may use purchase or manufacturing cost. A pricing decision may also need packaging, shipping subsidies, marketplace commissions, card fees, direct labor, discounts and expected returns.

Gross margin is not net margin. Net profit accounts for operating expenses, interest, tax and other business-wide costs. A product can have a healthy gross margin while the business still loses money after rent, payroll, software and marketing.

Losses remain negative

When cost exceeds revenue, the calculator shows negative profit, margin and markup. The sign matters: removing it would turn a loss into a result that looks profitable.

This page provides arithmetic rather than accounting, tax or pricing advice. Use cost definitions that match the decision and verify material pricing changes against the business’s full accounts.

Frequently asked questions

How is profit margin calculated?

Subtract cost from revenue to get gross profit, divide that profit by revenue, then multiply by 100. If an item sells for $100 and costs $60, gross profit is $40 and margin is 40%.

What is the difference between margin and markup?

They use different denominators. Margin divides profit by selling price; markup divides profit by cost. A product costing $60 and selling for $100 has a 40% margin but a 66.67% markup.

How do I find a selling price for a target margin?

Divide cost by one minus the target margin as a decimal. For a $60 cost and 40% target margin, the calculation is $60 ÷ 0.60 = $100.

Can profit margin be negative?

Yes. When cost is greater than revenue, gross profit and margin are negative. The calculator keeps the negative sign so a loss is not mistaken for a positive return.

Why can margin never reach 100% when cost is positive?

A 100% margin would mean the entire selling price is profit and cost is zero. With any positive cost, the price required by the formula approaches infinity as the target approaches 100%.

What should I include in cost?

That depends on the decision. Product-level gross margin often uses direct cost of goods; a sustainable price may also need shipping, payment fees, labor, returns and allocated overhead. The calculator only includes what you enter.

Is gross margin the same as net margin?

No. Gross margin subtracts the direct cost of the product or service. Net margin is calculated after operating expenses, interest, tax and other costs across the business.