Product Pricing Calculator for Ecommerce: Formula, Inputs, and Worked Examples

Faisal HouraniFaisal Hourani· Founder & eCommerce Growth Strategist
May 3, 202610 min read

Is your store leaking revenue?

Find out exactly where you're losing sales — takes 2 minutes.

Find Your Revenue Leaks

The calculation most stores skip — and the margin bleed that follows

Pricing without a formula is guessing.

And guessing is expensive — especially when your cost structure is more complex than it looks.

Product pricing calculator showing cost inputs and margin formula on a laptop screen

Most Shopify founders we audit set their prices one of two ways: they mirror a competitor (without knowing that competitor's cost structure) or they multiply cost by a round number and call it done. Both approaches bleed margin in ways that only show up months later.

This post walks you through the product pricing calculator framework we use — the inputs, the formula, and worked examples you can apply to your store today.

What Is a Product Pricing Calculator?

Numbers first.

A product pricing calculator is a formula-based tool that takes your full cost inputs — COGS, shipping, platform fees, and target margin — and outputs the minimum viable selling price. Used correctly, it prevents margin compression, surfaces hidden costs, and creates a price floor below which selling is unprofitable. Most ecommerce stores have one; few use the right inputs.

The definition matters because "pricing calculator" means different things to different people.

For a manufacturer, it means cost-plus to wholesale. For a dropshipper, it means landed cost to retail. For a DTC Shopify brand, it means total variable cost to consumer price — which has at least five moving parts, not two.

We'll build the DTC version here, because that's where the gaps are.

What Inputs Does a Product Pricing Calculator Need?

Most stores only use two inputs. They need five.

A complete product pricing calculator requires five cost categories: (1) product cost (COGS), (2) shipping and fulfillment cost per unit, (3) payment processing fees, (4) platform or marketplace fees, and (5) a return/shrinkage allowance. Missing even one of these categories creates a price floor that appears profitable but isn't.

Here is the full input set with typical ranges for DTC ecommerce:

Input What It Covers Typical Range
Product cost (COGS) Manufacturing, materials, packaging Varies by product
Inbound shipping Freight from supplier to warehouse $0.50–$3.00 per unit
Outbound fulfillment Pick, pack, last-mile delivery to customer $3–$8 per unit (standard parcel)
Payment processing Stripe, Shopify Payments, PayPal 2.5–3.5% of sale price
Platform fees Shopify subscription allocated per order $0.10–$0.50 per order
Return/shrinkage allowance Returned goods, defects, write-offs 2–8% of revenue, category-dependent
Marketing cost per order Ad spend or affiliate cost allocated per unit Varies by channel

Source: Industry benchmarks from Shopify (2025) + WebMedic audit data across DTC Shopify stores

The last row — marketing cost per order — is optional in the base pricing formula but critical for contribution margin analysis. We cover that separately in the guide on ecommerce profit margins.

How Do You Calculate the Right Price for a Product?

Two formulas, used together.

The standard product pricing formula is: Selling Price = Total Variable Cost ÷ (1 − Target Margin %). This produces the price needed to achieve a specific gross margin. For a product with $18 total variable cost and a 50% gross margin target, the formula gives $36. This is the cost-plus margin method, and it is the baseline for every DTC pricing decision.

The most common mistake: using markup percentage instead of margin percentage, and treating them as the same thing. They are not.

  • Markup = Profit ÷ Cost
  • Margin = Profit ÷ Selling Price

A 50% markup on a $20 product gives a $30 price (profit = $10, margin = 33%). A 50% margin on a $20 product gives a $40 price (profit = $20, margin = 50%).

Same target. Different outcomes. The margin-based formula is the one that maps to your P&L.

Ecommerce pricing formula diagram showing cost inputs flowing into the selling price calculation

The Core Formula, Step by Step

Step 1 — Total Variable Cost (TVC):

TVC = COGS + Inbound Shipping + Outbound Fulfillment + Processing Fee + Platform Fee + Return Allowance

Step 2 — Selling Price (Margin Method):

Selling Price = TVC ÷ (1 − Target Gross Margin %)

Step 3 — Verify the Margin:

Gross Margin % = (Selling Price − TVC) ÷ Selling Price × 100

Run Step 3 as a sanity check. It should match your target from Step 2.

What Pricing Formula Do High-Performing Ecommerce Stores Use?

They start with cost and layer in market positioning.

The best-performing DTC stores combine two approaches: a cost-floor formula to establish the minimum viable price, then a competitive and value-based check to determine where within the acceptable range to land. Pricing only to cost floor leaves money on the table; pricing only to market ignores whether the business is actually profitable.

In practice, this is a two-step validation:

  1. Floor check: Is this price above our TVC + target margin? If no, the product needs a cost renegotiation or we need to cut it.
  2. Ceiling check: What does the market support? What do comparable products sell for? Is there a value premium we can capture?

The floor is math. The ceiling is positioning. Most stores get the ceiling right (they watch competitors) and fumble the floor (they don't know their real TVC).

Does this sound like your store? Find out where you're leaking margin — take the free Revenue Score. 3 minutes. Free. No pitch.

How Do You Calculate Markup vs. Margin on a Product?

The table every founder should print out.

Markup and margin are calculated from the same profit figure but use different denominators: markup divides profit by cost, margin divides profit by selling price. A 100% markup equals a 50% margin. A 50% markup equals a 33% margin. Confusing the two is the single most common pricing error we see in ecommerce audits.

Target Gross Margin Equivalent Markup Formula (from cost)
20% 25% Cost × 1.25
30% 43% Cost × 1.43
40% 67% Cost × 1.67
50% 100% Cost × 2.00
60% 150% Cost × 2.50
67% 200% Cost × 3.00

Margin-to-markup conversion table. Source: WebMedic standard pricing reference.

The "keystone" markup — doubling cost — is common in retail because it's easy. But it only produces a 50% margin if your only cost input is COGS. Once you add fulfillment, processing fees, and returns, the realized margin on a keystoned product often lands at 35–42%.

That gap compounds across thousands of orders. It's not theoretical.

What Are Gross Margin Benchmarks by Ecommerce Category?

Context is everything when you set a target margin.

Gross margin targets vary significantly by ecommerce category: beauty and skincare typically achieve 60–75%, apparel 40–60%, electronics 20–35%, and home goods 35–50%. These ranges reflect industry data from Shopify's merchant benchmarking and public DTC brand financials. Your target margin should sit at the upper end of your category's range, not the middle.

Ecommerce gross margin benchmarks by product category shown in a comparison chart

Category Typical Gross Margin Range Notes
Beauty / skincare 60–75% High perceived value, low unit weight
Apparel / fashion 40–60% Returns inflate true cost
Electronics / gadgets 20–35% Thin margins, volume-dependent
Home goods / decor 35–50% Fragile goods add return/damage cost
Supplements / health 55–70% Regulatory + compliance cost varies
Pet products 45–65% Repeat purchase drives LTV
Food / consumables 30–50% Short shelf life increases write-off risk

Sources: Shopify merchant benchmarks (2025), public DTC brand financials, WebMedic client data

If your gross margin is below the floor of your category's range, one of two things is happening: your price is too low, or your cost structure is above-market. Both are solvable, but only once you measure them.

What Is the Product Pricing Formula for a Shopify Store?

Shopify adds two cost layers most calculators ignore.

For Shopify stores, the product pricing formula must account for two platform-specific costs: the transaction fee on non-Shopify Payments gateways (up to 2% per transaction on Basic plans) and the app subscription costs allocated per order. Missing these inputs overstates margin by 3–6 percentage points depending on plan and app stack — a meaningful error at scale.

Here is the Shopify-specific version of the TVC formula:

TVC = COGS
    + Inbound Freight
    + 3PL or Fulfillment Cost
    + Payment Processing (2.5–2.9% + $0.30 for Shopify Payments)
    + Transaction Fee (0–2% depending on plan, if not using Shopify Payments)
    + App Stack Allocation (monthly app costs ÷ monthly order volume)
    + Return Allowance (% of revenue × avg. refund cost)

For stores on Shopify Basic using a third-party gateway, the combined processing + transaction fee can reach 4–5% of revenue. Shopify's official fee schedule documents the exact rates per plan. That is a material input in the pricing formula, and we see it missed in roughly half the audits we run.

Use the cost-plus margin formula with this TVC, then validate against your break-even analysis to confirm the price supports your target order volume.

How Do You Price a Product for Profitability?

The math is straightforward. The discipline is not.

To price a product for profitability, calculate total variable cost across all five input categories, then apply the margin-based formula: Selling Price = TVC ÷ (1 − Target Margin %). For a $25.35 TVC and a 65% margin target, the formula yields a $72.43 selling price — not the $30 a simple cost-doubling approach would produce.

Here is a worked example from end to end.

Scenario: A Shopify beauty brand selling a $15 COGS serum. Target gross margin: 65%.

Input Amount
Product cost (COGS) $15.00
Inbound freight per unit $0.80
Fulfillment (pick + pack + shipping) $5.50
Shopify Payments processing (2.9% + $0.30) ~$1.60 (estimated on ~$45 sale)
App allocation $0.20
Return allowance (5%) ~$2.25 (estimated on ~$45 sale)
Total Variable Cost (TVC) ~$25.35

Target price calculation:

Selling Price = $25.35 ÷ (1 − 0.65) = $25.35 ÷ 0.35 = $72.43

Round to $72 or $74 depending on price psychology preferences. Verify:

Gross Margin = ($72 − $25.35) ÷ $72 = 64.8% ✓

Within a rounding distance of the 65% target.

DTC founder reviewing product pricing spreadsheet with cost inputs and margin targets

Now compare that to what a keystoned price gives: $15 × 2 = $30. At $30, the actual margin on this product (with all inputs) is:

Gross Margin = ($30 − $25.35) ÷ $30 = 15.5%

Fifteen percent. On a beauty product that should achieve 65%. That's a $32 per-unit margin gap — invisible if you're only looking at COGS vs. price.

For more on building the full cost picture, see the ecommerce pricing strategy guide and the contribution margin formula breakdown.

Frequently Asked Questions

What is the product pricing formula for ecommerce?

The standard product pricing formula is: Selling Price = Total Variable Cost ÷ (1 − Target Gross Margin %). Total variable cost includes product cost, shipping, fulfillment, payment processing, platform fees, and a return allowance. A $25 TVC with a 55% margin target yields a $55.56 selling price. Missing any cost input overstates margin.

What is the difference between markup and margin in pricing?

Markup is profit divided by cost; margin is profit divided by selling price. A 100% markup equals a 50% gross margin. A 50% markup equals a 33% gross margin. Most ecommerce founders confuse the two, which leads to prices that look profitable on paper but underperform on the P&L — especially once returns and platform fees are factored in.

How much should I mark up a product for Shopify?

The right Shopify markup depends on your category's gross margin benchmark and your full cost structure. Beauty products typically target 2.5x–3x cost (60–75% margin). Apparel targets 1.7x–2.5x (40–60% margin). Electronics are closer to 1.25x–1.5x (20–35%). Use the margin-based formula — not a flat multiplier — to account for Shopify's processing fees and app costs.

What costs are usually missing from a product pricing calculator?

The three most commonly missed inputs are: (1) payment processing fees (2.5–3.5% of revenue), (2) return/refund allowance (typically 2–8% of revenue depending on category), and (3) Shopify app subscription costs allocated per order. Skipping these makes prices appear profitable at the margin level but erodes actual profitability, especially at scale.

How do I find my break-even price for a product?

Break-even price is the selling price where gross profit equals zero — your total variable cost. Any price above TVC generates positive contribution margin; any price below it loses money per unit. Use the break-even analysis formula to calculate the unit volume needed to cover fixed costs at any given price point.

Keep Reading

Share this article

#product pricing calculator #ecommerce pricing formula #how to price a product #shopify product pricing #markup calculator #profit margin pricing

Free Download

The 15 revenue leaks killing Shopify stores — with real audit screenshots

From 10 actual store audits. Most stores have 8+ of these right now and have no idea.

Free. No spam. Unsubscribe anytime.

Faisal Hourani

Faisal Hourani

Founder & eCommerce Growth Strategist

19 years building for the web, 9+ focused on ecommerce. Faisal founded WebMedic in 2016 to help DTC brands fix the conversion problems that hold them back. He has worked with brands across Malaysia and Singapore — from first-store launches to 8-figure scaling.

Ready to Boost Your Conversion Rates?

Book a quick strategy call. We'll analyze your store, identify your biggest revenue leaks, and show you exactly how we can plug them.

Book Your Strategy Call

Score your store

Find Your Revenue Leaks