Profit Margin Calculator

Enter cost and price — margin and markup update as you type.

Profit Margin
Gross Profit
Markup
Cost / Price

Or price for a target margin:

Required Selling Price
Advertisement In-content responsive — ad slot

Margin, markup and gross profit — sorted

Price a product wrong and you either scare off customers or quietly lose money. This calculator turns your cost (COGS) and selling price into the three numbers every seller needs: gross profit in dollars, profit margin as a percentage of the sale, and markup as a percentage of the cost. It also works backward to price for a target margin.

The formulas

Gross profit = price − cost
Margin % = (price − cost) ÷ price × 100
Markup % = (price − cost) ÷ cost × 100
Price for a target margin = cost ÷ (1 − margin)

Margin vs markup — the mix-up that costs money

They're easy to confuse and the difference is real money. A product costing $60 and selling for $100 has a 40% margin but a 66.7% markup — same $40 profit, two different percentages because they use different bases (price vs cost). Quote the wrong one to a supplier or client and your numbers will be off.

Adding sales tax on top? Use the sales tax calculator (coming soon), and for discounts see the discount calculator.

This tool computes gross margins only and does not account for operating expenses, taxes, shipping or fees, which affect your net profit. For business decisions, review your full costs.

Frequently asked questions

What is the difference between margin and markup?

Margin is profit as a percentage of the selling price, while markup is profit as a percentage of the cost. A product costing $60 and selling for $100 has a 40% margin but a 66.7% markup — same dollar profit, different base.

How do you calculate profit margin?

Subtract the cost from the selling price to get gross profit, then divide by the selling price and multiply by 100. Margin percent = (price − cost) ÷ price × 100.

How do I price for a target margin?

Divide your cost by (1 minus the target margin as a decimal). For a 40% target margin on a $60 cost, the price is 60 ÷ (1 − 0.40) = $100.