Profit Margin Calculator

Enter what an item cost and what it sells for, and get the gross profit, the margin, and the markup that same profit represents. Or begin from the margin you want and let it find the price. If your starting point is cost plus a markup, the markup calculator prices upward from there.

Ten dollars out of forty

Margin is profit as a share of the selling price: margin = (price − cost) ÷ price. The calculator's starting point is a $30 cost against a $40 price. The $10 between them is gross profit, and $10 ÷ $40 is 25% — a quarter of what the customer paid stays with you before any overhead. That same $10 measured against the $30 cost is a 33.3% markup, and the calculator shows both because the two get swapped so often that a price built on the wrong one is the most common pricing error there is.

Margin has hard edges. It is 0% when the price equals the cost, and it goes negative when the price is below it — sell the $40 item for $30 and the result reads −33.3% and says plainly that it's a loss. It can never reach 100%, because that would need a cost of zero: ask for a 99% margin on $30 and the price is $3,000, which is why the field refuses anything from 100 up.

Pricing to a margin is a division

When the margin is the target and the price is the unknown, the formula turns over: price = cost ÷ (1 − margin). For a 40% margin on a $30 cost, $30 ÷ 0.60 = $50. Check it the other way: $20 of profit on $50 is 40%.

The mistake is a multiplication instead. $30 × 1.40 is $42, which feels like "40% on it". But $12 on $42 is a 28.6% margin. That is a margin applied as though it were a markup, and the shortfall is not a rounding error — 11.4 points of margin on every unit sold. The wider the target the worse it gets: a 60% margin needs a price of $75 on that $30 cost, a 150% markup, not the $48 that multiplying by 1.60 produces. Set "Also known" to Profit margin % and the calculator divides so you don't have to remember which operation is which.

The markup behind each margin

Same profit, other base — the markup you would have to put on cost to land each margin.

Margin on priceMarkup on cost
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%
75%300.0%

The conversion is markup = margin ÷ (1 − margin), and it runs backwards as margin = markup ÷ (1 + markup): a 20% margin needs a 25% markup, and a 25% markup produces a 20% margin. Past the halfway mark the markup runs away — 50% margin means the price is double the cost, 75% means four times it. The markup calculator carries the table from the markup side, at the values that get quoted on cost.

Margin across more than one sale

Margins don't average; profits and revenues add. Sell the $40 item at its 25% and a $100 item at 50% — a $50 cost — in the same afternoon. Profit is $10 + $50 = $60 on $140 of revenue, a 42.9% blended margin, not the 37.5% you get by averaging the two percentages. The dearer item drags the blend toward its own margin because it brings more of the revenue. To find the margin on a week, a product line or a whole year, total the revenue, total the cost of what was sold, and run the formula once on the totals — the calculator takes $140 and $80 as readily as it takes one unit.

Whatever comes out is still gross margin. Rent, software, wages, your own hours and the income tax on what remains all come after it, and net margin — profit after every one of them, as a share of revenue — is a smaller number that lives on a full income statement, not on this page. Once the gross profit is in hand, the self-employed tax calculator shows what the CRA takes from it and what to set aside.

Where sales tax goes

Nowhere near the margin. Both figures go in before GST/HST. Registration becomes compulsory when taxable sales pass $30,000 across four consecutive quarters or inside one quarter alone, and from then on the tax a supplier charges you comes back as an input tax credit, so it was never cost, while the tax you charge is held for the CRA and passed on, so it was never revenue. The customer hands over more than $40, but $40 is the price and $10 is the profit.

Where it goes wrong is mixing conventions. A cost copied tax-inclusive from a supplier's invoice, set against a shelf price quoted before tax, understates the margin on every item. Strip the tax from both, or from neither, and the percentage is right; strip it from both and the dollar profit is right too. The one case where tax genuinely belongs in the cost is the small supplier below the $30,000 line who charges none — with no registration there's no credit, and the tax paid on stock stays paid.

Common questions

How do you calculate profit margin?

Margin = (price − cost) ÷ price. A $30 item sold for $40 makes $10 of gross profit, and $10 ÷ $40 is 25%. The base is always the price, never the cost.

How do I set a price for a 40% margin?

Divide the cost by 0.60: price = cost ÷ (1 − margin). For a $30 cost, $30 ÷ 0.60 = $50. Multiplying by 1.40 gives $42, which is a 40% markup and only a 28.6% margin.

What markup equals a 25% margin?

33.3%. Markup = margin ÷ (1 − margin): 0.25 ÷ 0.75 = 33.3%. The $10 of profit on the $30 cost, $40 price item is a quarter of the price and a third of the cost.

Is this gross margin or net margin?

Gross. It is the profit on a sale before overhead, wages and income tax. Net margin takes all of those off first and comes from a full income statement, not from the cost and price of one item.

Should I include HST in the cost and price?

No. Both go in before GST/HST. Once registered, the tax you pay on stock comes back as an input tax credit and the tax you charge is passed on to the CRA — neither one is yours to count.