Core formulas
The formulas to keep straight
Selling price from margin = Total unit cost / (1 - target margin)Selling price from markup = Total unit cost x (1 + markup)Fee-adjusted selling price = (Total unit cost + fixed fee) / (1 - target margin - percentage fee)Unit cost = Total batch cost / sellable unitsGross margin = (Selling price - total unit cost - selling fees) / selling priceWhat is the selling price formula?
The selling price formula depends on the target. For margin, divide total unit cost by 1 minus target margin. For markup, multiply total unit cost by 1 plus markup. If a percentage fee comes out of the sale, subtract that fee rate in the margin formula too.
Formula and example math on this page were checked on July 3, 2026. The formulas are not platform rates. They are pricing math, so they only change if your cost, fee assumption, or target profit changes.
A $40 cost needs a $66.67 selling price to keep a 40% margin before fees. A $40 cost with a 40% markup sells for $56 and keeps a 28.6% margin before fees.
Selling price formula table
Dollar examples use a $40 total unit cost unless noted.
| Goal | Formula | Example result | Use it when |
|---|---|---|---|
| Target margin | Cost / (1 - margin) | $40 / 0.60 = $66.67 | You need profit to be a share of the final sale |
| Target markup | Cost x (1 + markup) | $40 x 1.40 = $56.00 | You need a fast cost-plus quote |
| Margin plus percentage fee | Cost / (1 - margin - fee rate) | $40 / 0.55 = $72.73 | A fee is taken from the selling price |
| Margin plus fixed fee | (Cost + fixed fee) / (1 - margin) | $40.30 / 0.60 = $67.17 | A flat payment fee applies to each order |
| Unit price | Batch cost / sellable units | $900 / 110 = $8.18 | You produce many units at once |
Should you calculate selling price with margin or markup?
Use margin for the final price. Markup is fine for a quick quote, but margin is better for real selling because it tells you how much of the sale is left after cost. That is the number that has to pay for fees, discounts, ads, and owner pay.
The common mistake is adding 40% to cost and thinking the product has a 40% profit margin. It does not. Adding 40% creates a 40% markup, which is only a 28.6% margin before fees.
Use markup only when the decision is cost-based, like quoting a wholesale job from a known cost sheet. Use margin when the product has to survive the real store.
- Use margin for ecommerce, handmade products, subscriptions, services, and paid ads.
- Use markup for supplier quotes, wholesale cost-plus work, and quick internal estimates.
- Check the implied margin before publishing any markup-based price.
How do you calculate selling price per unit?
To calculate selling price per unit, add every batch cost, divide by the number of sellable units, then use that unit cost in the margin formula. Count sellable units, not produced units, because damaged units still cost money even if they cannot be sold.
If a batch costs $900 and only 110 units can be sold, the unit cost is $8.18, not $7.50. Pricing from the 120 units produced would hide $0.68 of cost inside every sale.
The tighter the product margin, the more this matters. A small unit-cost error can erase the profit on low-priced items.
Unit-cost example for selling price
This example assumes a small batch where 10 of 120 units are not sellable.
| Line item | Amount | Pricing effect |
|---|---|---|
| Materials | $540 | Included in batch cost |
| Labor | $240 | Included because owner time still has a cost |
| Packaging | $80 | Included before margin |
| Waste and damaged units | $40 | Included because the batch still paid for them |
| Total batch cost | $900 | The cost basis |
| Sellable units | 110 | The denominator for unit cost |
| Unit cost | $8.18 | $900 divided by 110 |
How do fees change the selling price formula?
Fees change the formula because many fees are taken from the selling price, not from cost. If your product costs $35, your target margin is 35%, and your percentage fee assumption is 5%, the price is $35 divided by 0.60, or $58.33.
Do not add percentage fees after the price is set if you need an exact margin. Put the fee rate in the denominator. Fixed fees work differently, so add them to the cost side before dividing.
A $35 unit cost with a 35% target margin and a 5% percentage fee needs a $58.33 selling price. That price leaves $20.42 profit after the $2.92 fee.
- Percentage fee formula: cost / (1 - margin - fee rate).
- Fixed fee formula: (cost + fixed fee) / (1 - margin).
- Mixed fee formula: (cost + fixed fee) / (1 - margin - percentage fee).
What if competitors sell for less?
If competitors sell for less than your profit-safe price, do not copy them blindly. First check whether they have lower costs, higher volume, cheaper shipping, a different product, or weaker margins. Your price floor is the lowest price that still covers cost, fees, and required profit.
The right move is not always to lower price. Sometimes the better move is to reduce cost, sell a bundle, change the offer, or stop selling that item. A product that only works at someone else's cost structure is not a product you can scale.
Use competitor prices as a market check, not as the formula. The formula tells you what the product must earn. The market tells you whether the offer deserves that price.
- Lower the price only if the new price still clears your profit floor.
- Raise perceived value before cutting margin.
- Cut products that need perfect conditions to avoid losing money.
How should discounts and shipping affect selling price?
Discounts and free shipping should be priced before launch, not after the product is live. A 15% coupon reduces revenue immediately. Free shipping is not free for the seller, so it belongs in unit cost if you pay for the label.
If a $70 product has a 15% coupon, the customer pays $59.50 before tax. If the product was priced to barely hit margin at $70, that coupon can turn a good-looking order into a weak one.
The clean workflow is simple. Price the product at the normal price, test the discounted price, then test the shipping scenario. If all three work, the product is much safer to publish.
- Put seller-paid shipping inside cost.
- Run a coupon scenario before promoting a sale.
- Check the price again if packaging, labor, or shipping cost changes.
Decision table
Selling price method by situation
Use the method that matches the business question, not the one that gives the lowest-looking price.
| Situation | Best method | Reason |
|---|---|---|
| Need a final ecommerce price | Margin formula | It protects profit as a share of revenue |
| Need a quick wholesale quote | Markup formula | It adds a clear percentage to cost |
| Sell through a marketplace or processor | Fee-adjusted margin formula | The fee comes out of the sale |
| Sell low-priced products | Fixed-fee adjusted formula | Flat fees take a larger share of small orders |
| Produce in batches | Batch cost per sellable unit | Damaged units still cost money |
| Plan coupons or free shipping | Discount and shipping scenario | The advertised price is not always the money kept |
| Run paid ads | Margin plus break-even ROAS | Ad spend is paid from pre-ad profit |
Worked examples
Examples you can compare against your own numbers
Example 1: $40 cost with 40% margin vs 40% markup
Calculator inputs: materialCost=40, packagingCost=0, laborHours=0, laborRate=0, shippingCost=0, platformFee=0, targetMargin=40.
| Total unit cost | $40.00 | The full cost counted before profit |
|---|---|---|
| Price with 40% markup | $56.00 | $40 x 1.40 |
| Profit at 40% markup | $16.00 | $56 - $40 |
| Margin at 40% markup | 28.6% | $16 / $56 |
| Price for 40% margin | $66.67 | $40 / (1 - 40%) |
Takeaway: A 40% markup misses the 40% margin price by $10.67 on this product.
Open the $40 margin exampleExample 2: $35 cost with a 35% margin and 5% fee
Calculator inputs: materialCost=28, packagingCost=4, laborHours=0, laborRate=0, shippingCost=3, platformFee=5, targetMargin=35.
| Product cost | $28.00 | Materials or wholesale cost |
|---|---|---|
| Packaging | $4.00 | Box, label, insert, and packing supplies |
| Shipping you absorb | $3.00 | Seller-paid shipping cost |
| Total unit cost | $35.00 | $28 + $4 + $3 |
| Formula | $35 / (1 - 0.35 - 0.05) | Margin plus percentage fee |
| Selling price | $58.33 | Before sales tax and optional shipping charged to buyer |
| Fee at 5% | $2.92 | $58.33 x 5% |
| Profit | $20.42 | $58.33 - $35 - $2.92 |
Takeaway: The fee-adjusted formula keeps the 35% margin intact instead of discovering the fee after the sale.
Open the fee-adjusted exampleExample 3: batch cost divided by sellable units
Calculator inputs: materialCost=8.18, packagingCost=0, laborHours=0, laborRate=0, shippingCost=0, platformFee=6, targetMargin=45.
| Total batch cost | $900.00 | Materials, labor, packaging, and waste |
|---|---|---|
| Units produced | 120 | The production count before quality control |
| Sellable units | 110 | 10 units are damaged or kept as samples |
| Unit cost | $8.18 | $900 / 110 |
| Target margin | 45% | Profit as a share of selling price |
| Fee assumption | 6% | Percentage fee used for this scenario |
| Selling price | $16.69 | $8.18 / (1 - 0.45 - 0.06) |
Takeaway: Batch pricing should use sellable units. Produced units make the price look cheaper than it is.
Open the batch unit-cost exampleAction checklist
Before you use this number in the real business
- 1Write down the full unit cost, including labor and seller-paid shipping.
- 2Choose margin or markup before calculating the price.
- 3Use margin for the final selling price when fees, ads, or discounts matter.
- 4Add fixed fees to cost and percentage fees to the denominator.
- 5Divide batch costs by sellable units, not produced units.
- 6Test the normal price, discounted price, and shipping scenario before launch.
- 7Open the calculator with your real numbers before publishing the price.
Common mistakes
Mistakes that make the answer look better than reality
FAQs
Questions people ask before making the decision
What is the formula to calculate selling price?
The margin formula is selling price equals cost divided by 1 minus target margin. The markup formula is selling price equals cost multiplied by 1 plus markup. Use the margin formula for final pricing because it shows what you keep from the sale.
How do you calculate selling price with margin?
Divide total unit cost by 1 minus the target margin. If cost is $40 and target margin is 40%, the selling price is $66.67 because $40 divided by 0.60 equals $66.67.
How do you calculate selling price using markup percentage?
Multiply cost by 1 plus the markup percentage. If cost is $40 and markup is 40%, the selling price is $56. That price creates $16 profit and a 28.6% margin before fees.
How do I calculate selling price per unit?
Add the full batch cost, then divide by sellable units. If a batch costs $900 and 110 units can be sold, unit cost is $8.18. Use that unit cost in the margin or markup formula.
Should shipping be included in selling price?
Include shipping when you pay for it or advertise free shipping. If the buyer pays shipping separately, still check the actual label cost because undercharging shipping reduces profit.
How do I include payment fees in selling price?
For a percentage fee, subtract the fee rate in the denominator with your target margin. For a fixed fee, add the fixed fee to cost before dividing. If both apply, use both adjustments in the same formula.
What is a good profit margin for selling a product?
A good margin is the margin that pays your real costs and still leaves the profit you need. For final pricing, choose the target margin first, then test whether the market can support the price. If it cannot, fix the cost or offer before cutting profit.
Sources and notes
Where the assumptions come from
Reference for gross margin as gross profit divided by revenue.
Calculator used for the margin, fee, and unit-cost examples in this guide.
How FeeProofed checks formulas, examples, assumptions, and source notes.