UPFORGE APPS
Upforge Apps
(513) 951-1110Book a call

How to Price a Product for a Target Margin in Ecommerce

Selling price formula for a target margin with marketplace fees in the divisor, a margin-to-markup table, a CSV worksheet, and the free margin calculator.

To price a product for a target margin, divide your fixed per-unit costs by one minus the margin, minus every fee that's charged as a percentage of the price: price = (landed cost + packaging + shipping you pay) ÷ (1 − target margin − fee percentages). Most guides stop at cost ÷ (1 − margin). That's right across a shop counter and wrong online, where the marketplace fee, card processing, and returns all scale with the price you're about to set. Leave them out of the divisor and you'll miss the target on every product.

Margin and markup are two different numbers

Both describe the gap between what a product costs you and what you sell it for. Margin divides the gap by the price; markup divides it by the cost, so markup is always the larger number. A product that lands at $4.90 and sells at $8.17 has a 40% margin and a 66.7% markup. Your plan, your lender, and your accountant all talk in margin, so this page works in margin and computes the markup for you.

Margin and markup
margin = (price − cost) ÷ price · markup = (price − cost) ÷ cost

To convert: markup = margin ÷ (1 − margin), and margin = markup ÷ (1 + markup). Price from landed cost, not the supplier's invoice price.

Target marginMarkup that gets there
10%11.1%
20%25%
25%33.3%
30%42.9%
40%66.7%
50%100% (keystone)
60%150%
70%233%

The basic formula: price from cost and target margin

Selling price for a target margin
price = cost ÷ (1 − target margin)

Margin as a decimal: 40% is 0.40. Multiplying cost by 1.40 instead gives a 40% markup, which is only a 28.6% margin. Divide, don't multiply.

Northside Goods, the sample store inside the margin calculator, sells an enamel camp mug. Its numbers stand in below; put yours in their place. Wholesale is the cleanest case: the buyer pays the freight, there are no card or marketplace fees, and the basic formula is the whole job.

Enamel camp mug, sold wholesale at a 40% target
Unit cost
$4.20
Inbound freight per unit
$0.70
Landed cost
4.20 + 0.70 = $4.90
Polybag (packaging)
$0.50
Cost to price from
4.90 + 0.50 = $5.40
Wholesale price
5.40 ÷ (1 − 0.40) = $9.00

Check it: $9.00 − $5.40 = $3.60, and 3.60 ÷ 9.00 = 40%. On landed cost alone that's an 84% markup.

Fees that are a percentage of the price go in the divisor

Card processing, a marketplace referral fee, and a returns reserve are charged as a share of whatever you sell for, so they rise with the price. The common shortcut adds them up at today's price, treats the total as a fixed cost, and divides by (1 − margin); the new, higher price then makes the fees bigger than the number you used, and the margin lands short. Put the percentages in the divisor and the formula charges them at the price it produces.

Selling price with percentage fees
price = (landed cost + packaging + shipping you pay) ÷ (1 − target margin − processing % − marketplace % − returns %)

Every percentage as a decimal. If the percentages plus the target reach 100%, no price works. A flat per-order processor fee is a fixed cost and goes in the numerator with packaging.

The sample lists the mug on a marketplace at $18 with a 15% referral fee, a 4% returns reserve, no separate card fee, and $3.90 of shipping the store absorbs. Those are the sample's stand-ins; use your category's real referral rate and your own refund history.

The same mug on a marketplace, priced two ways
Fixed per-unit costs
4.90 landed + 0.50 packaging + 3.90 shipping = $9.30
Percentage fees
15% referral + 4% returns reserve = 19% of price
The shortcut (fees taken at the current $18)
9.30 + 3.42 = 12.72; 12.72 ÷ 0.60 = $21.20
What $21.20 actually earns
fees become 19% × 21.20 = $4.03; net $7.87; margin 37.1%
The full formula
9.30 ÷ (1 − 0.40 − 0.19) = 9.30 ÷ 0.41 = $22.68
What $22.68 earns
fees $4.31; net $9.07; margin 40.0%

At its current $18 the mug nets $5.28, a 29.3% margin, eleven points under target, which is why the calculator shows $22.68 in the price-for-target column beside it.

One product, three prices

The same 40% target needs a different price on every channel, because each channel has its own fee percentages and fixed costs. Here's the mug priced for the three channels in the sample catalog, from the one formula.

ChannelFixed per unit% of pricePrice for 40%Markup on landed
Wholesale (buyer pays freight, no fees)$5.400%$9.0084%
Own store (2.9% processing, 4% returns, $3.90 shipping)$9.306.9%$17.51257%
Marketplace (15% referral, 4% returns, $3.90 shipping)$9.3019%$22.68363%

The markup column is the case against running a multichannel store on a markup rule: one 40% margin is an 84% markup in one place and a 363% markup in another. The $5.17 between the own-store and marketplace prices is the referral fee, nothing else.

Keystone and other rules of thumb, and where they break

Keystone pricing is the oldest retail rule: set the shelf price at double the wholesale cost. Wikipedia's entry, as of 2026, still defines it that way, and it works out to a 100% markup and a 50% margin before any selling cost. It was built for a shop where the customer carries the product out the door. Keystone the sample mug and you get 2 × $4.90 = $9.80. On the marketplace, $9.80 pays $1.86 in fees and $3.90 in shipping on top of $5.40 in landed cost and packaging, and loses $1.36 a unit. Sold wholesale, the same $9.80 earns 44.9%.

  • Keystone (2× cost): fine across a counter or on a wholesale line; underwater on anything you ship free or sell through a marketplace.
  • Round numbers: fine, but round after the formula, not instead of it. Taking $22.68 down to $21.99 hands back 1.3 points of margin.

Check the price against the market before you commit

The formula gives the price you need; the market decides the price you can get. Look up what the same or the nearest comparable product sells for on that channel, then run the same equation backwards to see what that price would earn you.

Margin at a given price
margin = 1 − (fixed per-unit costs ÷ price) − fee percentages
The mug against a $19.99 marketplace price
Fixed per-unit costs
$9.30
Margin at $19.99
1 − (9.30 ÷ 19.99) − 0.19 = 34.5%
Gap to the 40% target
5.5 points, or $2.69 of price

Four ways to close a gap like that, in order: take a fixed cost out (a lighter mailer, a slower ship method), take a percentage out (sell it on your own store), accept a lower target on this SKU because it pulls other sales, or don't carry it there.

How to price yours

  1. Pull each product's landed cost: the supplier's unit price, plus inbound freight allocated per unit, plus duties as a percent of cost.
  2. List the fixed selling costs per unit: packaging, the outbound shipping you absorb (zero if the customer pays it), and any flat per-order processor fee.
  3. List the percentage fees for the channel: card processing, the marketplace referral fee for your category, and a returns reserve from your own refund history. One product on two channels is two rows.
  4. Pick the target margin, per product where the catalog mixes commodity items with your own designs; one store-wide target under-prices one and over-prices the other.
  5. Run fixed costs ÷ (1 − target − fee percentages) for each row, in the CSV worksheet below or by hand. Or start in the free margin calculator: enter each product's price, cost, freight, packaging, fees, shipping, and returns reserve, set the target at the top, and read the price for your target beside each product.
  6. Check every computed price against the market, decide which gaps to close, and re-run the rows whenever anything in the divisor moves: a fee change, a new processor, a carrier rate increase.

Questions people ask

Is a 30% markup the same as a 30% margin?

No. A 30% markup divides the gap by cost, so a $10 cost sells at $13 and earns a 23.1% margin. A 30% margin divides the gap by price, so the same $10 cost needs $14.29, a 42.9% markup.

How do you add a 20% margin to a cost price?

Divide the cost by 0.80; don't multiply it by 1.20. A $10 cost divided by 0.80 is $12.50, and 2.50 ÷ 12.50 is 20%. Multiplying by 1.20 gives $12, a 20% markup and only a 16.7% margin.

What is the selling price formula for a target margin?

Price equals fixed per-unit costs divided by one minus the target margin, minus every fee charged as a percentage of the price. Fixed per-unit costs are landed cost plus packaging plus the shipping you pay. With no percentage fees it collapses to cost ÷ (1 − margin).

Should marketplace fees be included when pricing for a margin?

Yes, in the divisor, not the numerator. A referral fee is a share of whatever you charge, so it grows with the price you're setting. Treat it as a fixed dollar amount and you'll price too low; subtract its percentage from one alongside the margin and the price comes out right.

What is keystone pricing?

Setting the retail price at double the wholesale cost, a 100% markup and a 50% margin before selling costs. It works where the customer carries the product away. Ship it free or sell it through a marketplace and postage and fees come out of that 50%, and can take all of it.

Skip the spreadsheet

The free margin calculator does this math for every product you enter, in your browser, with no account. Landed cost, fees, shipping, and returns per product. See the real margin, and the price that hits your target.

Open the margin calculator

Updated September 5, 2026 · Written by Upforge, Cincinnati

esc
Build
OverviewBuild
What we buildBuild
How we build itBuild
InvestmentBuild
Try
Home servicesTry
Property managementTry
Architecture & engineeringTry
Events & tourismTry
Ecommerce & retailTry
Proof
Our app workProof
Home services
Dispatch boardHome services
Quote builderHome services
Property management
Rent rollProperty management
Maintenance requestsProperty management
Architecture & engineering
Bid pipelineArchitecture & engineering
Go/No-Go scorecardArchitecture & engineering
Events & tourism
Capacity trackerEvents & tourism
Registration listEvents & tourism
Ecommerce & retail
Margin calculatorEcommerce & retail
Reorder plannerEcommerce & retail
Ecommerce & retail docs
Reorder Point Formula, With a Worked ExampleEcommerce & retail docs
Property management docs
Rental Property Maintenance Log Template (CSV)Property management docs
Home services docs
Jobs Per Tech Per Day: The Service Tech Capacity FormulaHome services docs
Ecommerce & retail docs
How to Price a Product for a Target Margin in EcommerceEcommerce & retail docs
Home services docs
Flat Rate vs Time and Materials for HVAC and PlumbingHome services docs
Ecommerce & retail docs
How to Calculate Landed Cost for Multiple Items (Template)Ecommerce & retail docs
Events & tourism docs
Event No-Show Rate: Formula, Benchmarks, and ForecastEvents & tourism docs
Ecommerce & retail docs
Amazon FBA Profit Margin Formula, Fee by FeeEcommerce & retail docs
Events & tourism docs
Event Break-Even: How Many Tickets You Need to SellEvents & tourism docs
Architecture & engineering docs
Go/No-Go Decision Matrix Template for AEC FirmsArchitecture & engineering docs
Property management docs
How to Prioritize Maintenance Requests: A Rental MatrixProperty management docs
Proof
Start a projectProof
Talk to us
Book a callTalk to us
Call (513) 951-1110Talk to us
↑↓ to move↵ to openesc to close