Use this free profit margin calculator to see how much you keep from every sale. Enter your cost and selling price to get profit, gross margin, and markup, or work backwards to find the price you need for a target margin or markup. Add a quantity to see totals for a whole order. Everything runs in your browser and nothing is uploaded.
Margin and markup are not the same thing. Margin is profit as a share of the selling price. Markup is profit as a share of the cost.
How to use the profit margin calculator
Pick what you want to find, then fill in the fields. Results update as you type.
- Find margin: enter cost and selling price to get profit, margin, and markup.
- Price for target margin: enter cost and the margin you want to get the selling price.
- Price for markup: enter cost and a markup percentage to get the selling price.
- Other costs: add shipping, packaging, or fees per unit so profit reflects your real cost.
- Quantity: enter units to see total revenue, total cost, and total profit.
How the results are calculated
- Unit cost: cost per unit plus other costs per unit.
- Profit: selling price minus unit cost, multiplied by quantity.
- Gross margin: profit divided by revenue, shown as a percentage.
- Markup: profit divided by total cost, shown as a percentage.
- Price for target margin: unit cost divided by (1 minus the margin).
- Price for markup: unit cost multiplied by (1 plus the markup).
What this tool does and does not do
This tool calculates gross margin and markup from the numbers you enter. It does not store your data, account for taxes, overheads, or discounts unless you include them in your costs, or calculate net profit. Include every cost that belongs to the product to get a realistic result.
Margin and markup at a glance
| Metric | Formula | What it tells you |
|---|---|---|
| Profit | Revenue − Cost | The money left after paying for what you sold. |
| Gross margin | Profit ÷ Revenue × 100 | How much of each sale you keep as profit. |
| Markup | Profit ÷ Cost × 100 | How much you add on top of cost to set the price. |
| Price from margin | Cost ÷ (1 − Margin) | The price needed to reach a target margin. |
| Price from markup | Cost × (1 + Markup) | The price after adding a fixed percentage to cost. |
A 50% markup is only a 33.33% margin. Mixing the two up is the most common pricing mistake.
Worked examples
Finding the margin on a product
A product costs 60.00 and sells for 100.00. Profit is 40.00, the margin is 40%, and the markup is 66.67%.
Pricing for a target margin
To earn a 40% margin on a unit cost of 60.00, the price is 60.00 ÷ (1 − 0.40) = 100.00.
Pricing with a markup
Adding a 50% markup to a cost of 60.00 gives a price of 90.00. Profit is 30.00, so the margin is 33.33%.
Checking a whole order
You buy 200 units at 12.00 each and sell them at 20.00. Revenue is 4,000.00, total cost is 2,400.00, profit is 1,600.00, margin is 40%, and markup is 66.67%.
Common pricing mistakes
- Confusing margin with markup. A 30% markup does not give a 30% margin. Use the right formula for the goal.
- Leaving out other costs. Shipping, packaging, and payment fees reduce profit. Add them to see the real margin.
- Ignoring discounts. If you sell at a discount, enter the discounted price or your margin will look better than it is.
- Treating gross margin as net profit. Rent, wages, and marketing still need to be paid from gross margin.
Frequently asked questions
Is this profit margin calculator free?
Yes. There is no sign-up and no limit on how many calculations you run.
What is the difference between margin and markup?
Margin is profit divided by the selling price. Markup is profit divided by the cost. For the same sale, markup is always the larger number, unless profit is zero.
How do I calculate the selling price for a target margin?
Choose "Price for target margin", enter your cost and the margin you want. The price is the unit cost divided by one minus the margin. A margin of 100% or more is not possible.
Can the margin be negative?
Yes. If the selling price is lower than your unit cost, the result shows a loss and a negative margin.
Is my data saved or uploaded?
No. Everything is calculated in your browser and nothing is sent to a server. Your entries are lost when you close or refresh the page, so copy or export before leaving.
Does this calculate net profit?
No. It calculates gross margin from the costs you enter. To estimate net profit, include all costs that apply to each unit, or subtract overheads from the total profit separately.