PDVyn
Log in Start free

← All articles

How to calculate selling price: markup vs margin

How to calculate selling price: markup vs margin

To calculate a selling price, add up everything the product costs you until it's on the shelf, then divide by what's left after the margin you want and the fees taken from each sale: price = cost ÷ (1 - margin - fees). Markup and margin are different numbers, and mixing them up is the most common pricing mistake. If you'd rather skip the math, the selling price calculator works it out from your cost, fees and target margin.

Every number in this guide is an example to show the math. Your card fees and your taxes are the ones in your processor's agreement and your own tax situation.

Start with your real cost

Cost isn't only the price on the supplier's invoice. It's everything you spend to have the product ready to sell: the purchase price, your share of the shipping, packaging and losses.

Example: you buy a case of 24 cans for $72.00 and pay $6.00 for delivery. Each can doesn't cost $3.00. It costs ($72.00 + $6.00) ÷ 24 = $3.25.

Losses are a cost too. If 5 out of every 100 bananas go bad before they sell, the 95 you sell pay for all 100. With a cost of $10.00 per unit and 5% loss, the cost of each unit you actually sell becomes $10.00 ÷ 0.95 = $10.53. Breakage and expired stock belong here. If you don't know how much you lose, start with our inventory management guide.

Markup and margin are not the same thing

The two words show up together all the time, and that's where the confusion comes from.

Markup: what you add on top of cost

Markup is the percentage you add to the cost. Price = cost × (1 + markup).

Example: cost of $10.00 and a 50% markup. Price = $10.00 × 1.5 = $15.00.

Some people talk about markup as a multiplier. "Keystone", or doubling the cost, means multiplying by 2, which is the same as a 100% markup.

Margin: how much of the price you keep

Margin is profit divided by the selling price. Margin = (price - cost) ÷ price.

In the same example, profit is $5.00 and the price is $15.00. The margin is $5.00 ÷ $15.00 = 33.3%. So a 50% markup gives you a 33.3% margin, not 50%.

To get a true 50% margin, the math is different: price = cost ÷ (1 - margin) = $10.00 ÷ 0.5 = $20.00. Then the profit is $10.00, half the price.

Conversion table

Before fees and taxes, the relationship between the two is fixed:

Markup Margin it gives
25% 20%
42.9% 30%
50% 33.3%
66.7% 40%
100% (doubling the cost) 50%

To convert by hand: margin = markup ÷ (1 + markup), and markup = margin ÷ (1 - margin).

Which one should you use? Margin answers the question that matters more: out of every $100 that comes in, how much stays with you? The calculator takes either one and shows the real margin in the result.

Stationery shop owner writes product costs in a notebook next to her phone

Put the fees on each sale into the math

Card fees, and anything else taken as a percentage of the sale, come out of the price, not the cost. Leave them out and the margin you planned isn't the margin you get.

Example with made-up rates: a 3% card fee and 6% for anything else taken from the sale, 9% in all. You want a 30% margin on a product that costs $10.00.

  • Right price: $10.00 ÷ (1 - 0.30 - 0.09) = $10.00 ÷ 0.61 = $16.39.
  • Checking: the fees take $1.48, the profit is $4.91 and the margin comes out at 30%.

Now the usual mistake. If you work out the 30% margin without fees, you get $10.00 ÷ 0.70 = $14.29. At $14.29, the same 9% in fees takes $1.29, and profit drops to $3.00. The real margin is 21%, not 30%.

If a lot of your sales are on card, work out each payment method on the card fee calculator and use an average fee in your pricing. Our guide on passing card fees to customers shows how to weight the average.

What about taxes?

Sales tax and VAT work differently from country to country, and in some countries from state to state or city to city, so there's no rate here that fits everyone. The logic, though, is the same everywhere. Ask one question: does this tax come out of my price, or is it added on top?

If the tax is added on top at checkout and you pass it to the government, it isn't your money and it doesn't come out of your margin. Your job is to make sure your POS adds it correctly.

If your shelf prices already include the tax, it comes out of the price. Put it in the fees line, next to the card fee.

If your business pays a tax worked out as a percentage of revenue, that also goes in the fees line. If it pays a fixed amount each month, treat it as a fixed cost, like rent.

To know which case is yours and what the rate is, ask your accountant or your local tax agency. Don't use the example percentages in this guide.

Products sold by weight

With cheese and deli meats, the cost per pound changes after you trim. Example: you buy a 4 lb wheel for $40.00, which is $10.00 a pound. After removing the rind and the trimmings, you have 3.8 lb left to sell. The real cost is $40.00 ÷ 3.8 = $10.53 a pound.

With the 30% margin and 9% in fees from the earlier example, the price per pound comes to $10.53 ÷ 0.61 = $17.26. Had you used the $10.00 from the invoice, you'd have landed on $16.39 and lost margin on every slice. The math is the same in kilos.

Product margin and shop margin

The margin you've worked out so far belongs to the product: what's left from each sale after cost and fees. It doesn't pay the rent yet. The shop's margin is what's left at the end of the month after fixed costs. A product with a healthy margin can sit inside a shop that loses money if the shop sells too little for the size of its expenses. The next section shows how much you need to sell.

Fixed costs: how many sales pay for the month

Rent, power, internet, wages and the POS subscription itself don't change with each sale, but your profit has to cover them. The math is simple: monthly fixed costs ÷ profit per unit.

Example: $3,000.00 in fixed costs and the $4.91 profit per unit from above. That's $3,000.00 ÷ $4.91, or about 611 sales a month just to break even. From sale 612 on, you're making money.

If that number looks unrealistic for your shop, the calculator isn't the problem. Either the price is too low, or the fixed costs are too heavy for how busy the shop is.

Mistakes that eat your profit

  • Using markup as if it were margin. A 30% markup gives a 23% margin.
  • Forgetting card fees and taxes, as in the example where the margin fell from 30% to 21%.
  • Leaving shrinkage out, especially in produce and baked goods.
  • Not repricing when the supplier raises prices. Cost went up, the price stayed, and the margin shrank without anyone noticing.
  • Discounting without doing the math. In the $16.39 example, 10% off brings the price to $14.75 and the profit from $4.91 to $3.42. Ten percent off the price, about 30% off the profit.
  • Copying a competitor's price without knowing your own cost.

Corner store employee changes price tags on a shelf of canned goods

After the math, look at the market

The formula gives you the lowest price that delivers the margin you want. It doesn't tell you whether customers will pay it. Compare with what shops near you charge and round sensibly: $16.39 can become $16.49 or $16.99 without putting anyone off.

If the market pays well below your minimum, you have three honest ways out. Negotiate the cost with your supplier, accept a smaller margin on that item because it brings people in, or stop selling it. What doesn't work is selling below cost without knowing it.

If you sell on store credit, waiting costs money too, because the cash comes in later. If you charge interest on late balances, the store credit interest calculator helps with the math.

Tracking margin day to day

Working out a price once is easy. Knowing at the end of the month whether the margin you planned actually happened is harder. In PDVyn, you enter the cost once, the margin shows next to the price, you get a warning when the cost goes up, and every sale shows its real profit (selling price calculator). For those numbers to be right, each product's cost has to be up to date, and that's true in any system. The Free plan costs $0 with up to 50 products, and every new account gets 15 days of Pro with no card (pricing). PDVyn does not issue tax documents. The calculators in this guide and a few more are on the free tools page.

Frequently asked questions

What's the difference between markup and margin?

Markup is the percentage added to cost. Margin is the percentage of the price you keep. With a cost of $10.00 and a price of $15.00, the markup is 50% and the margin is 33.3%.

What markup should I use?

There's no number that's right for everyone. Start from the margin you need to cover fixed costs and make a profit, work out the price, then compare it with the market. Products that sell fast can usually live with a smaller margin than products that sit on the shelf.

How do I calculate selling price with credit card fees?

Add the card fee to any other percentage fees on the sale and use price = cost ÷ (1 - margin - fees). With a cost of $10.00, a 30% margin and 9% in fees (example), the price is $16.39.

Does sales tax go into the selling price?

It depends on how the tax works where you sell. If it's added on top at checkout, it doesn't come out of your margin. If it's included in your shelf price or charged on your revenue, put it in the fees line. Your accountant can tell you which applies.

How do I find the margin on a product I already sell?

Take the price, subtract the cost and the fees on the sale, and divide what's left by the price. If you sell something that costs $10.00 for $14.29, with 9% in fees, the margin is 21%.

Updated November 28, 2026.