# Profit Margin Calculator

> Enter any two of cost, selling price and margin %. The third is calculated, along with markup, profit per unit and the price you need for any target margin.

- Source: https://plugstack.dev/tools/profit-margin-calculator/
- Published by: PlugStack
- Last updated: 2026-09-24

## How the profit margin is calculated

 

Profit margin (gross margin) tells you how much of each sale you keep after paying for the product itself:

 
- **Profit** = selling price − cost
- **Margin %** = profit ÷ selling price × 100
- **Price for a target margin** = cost ÷ (1 − margin)
- **Maximum cost for a price and margin** = price × (1 − margin)

 

**Example:** a candle costs you $12 to make and sells for $30. Profit is $18, the margin is 18 ÷ 30 = 60%, and the markup is 18 ÷ 12 = 150%.

 

## Margin vs markup

 

The two numbers describe the same profit from different sides, and mixing them up is one of the most common pricing mistakes. If you add a “50% markup” when you meant a 50% margin, you end up with a 33% margin.

 

| Markup | Equals margin |
| --- | --- |
| 25% | 20% |
| 50% | 33.3% |
| 100% (double the cost) | 50% |
| 150% | 60% |
| 200% (triple the cost) | 66.7% |

 

Switch the calculator to *Markup* to work the other way, or use the dedicated [markup calculator](https://plugstack.dev/tools/markup-calculator/).

 

## What to put in “cost”

 

For a quick product margin, use the purchase or manufacturing cost per unit. For the margin you actually earn per order, also add:

 
- payment processing fees (roughly 3% + a fixed fee per order — see the [fee calculator](https://plugstack.dev/tools/credit-card-processing-fee-calculator/)),
- packaging and pick-and-pack costs,
- shipping you pay for but don’t charge,
- an allowance for returns and damaged goods.

 

Advertising and fixed overheads are usually left out of gross margin and handled in a break-even calculation instead.

 

## Using the target-margin table

 

The table under the calculator lists the price you need at common margins and markups for the cost you entered. It’s a quick way to set list prices, check whether a supplier’s recommended retail price leaves you enough room, or decide how deep a sale can go before it stops paying.

 

## Margins and volume discounts

 

Quantity discounts eat into margin quickly: 15% off a product with a 40% margin cuts the margin to about 29%. Before you publish price breaks, run the numbers in the [tiered pricing calculator](https://plugstack.dev/tools/tiered-pricing-calculator/), which flags any tier that falls below the lowest margin you accept.

## FAQ
### What is a good profit margin for an online store?
It depends on the category. Gross margins of 30–50% are common for physical products sold online, lower for electronics and higher for accessories, cosmetics and private-label goods. Calculate the margin you need to cover shipping, payment fees, returns and marketing, then price from that number instead of copying a benchmark.

### Is profit margin the same as markup?
No. Margin is profit divided by the selling price; markup is profit divided by the cost. A product that costs $60 and sells for $100 has a 40% margin but a 66.7% markup. The calculator shows both.

### How do I calculate the selling price from a target margin?
Price = cost ÷ (1 − margin). For a $25 cost and a 40% margin: 25 ÷ 0.60 = $41.67. Enter the cost and the margin above and the price field fills in.

### Why can’t the margin be 100% or more?
Margin is a share of the price, so 100% would mean the cost is zero. Markup has no upper limit — a 300% markup is perfectly possible.

### Does this include payment fees and shipping?
Only if you include them in the cost. For a true per-order margin, add the payment fee (see the payment fee calculator), packaging and any shipping you pay to the unit cost.
