Gross Margin vs. Markup Calculator: Set Prices After Fees, Returns, and Landed Costs
gross marginmarkup calculationproduct pricingecommerce financespreadsheet templates

Gross Margin vs. Markup Calculator: Set Prices After Fees, Returns, and Landed Costs

CCalculation Shop Editorial Team
2026-11-18
7 min read

Learn the difference between markup and gross margin, then price products after landed costs, fees, returns, discounts, and bundles.

A gross margin calculator and markup calculator answer different pricing questions. This guide shows how to calculate both, adjust for landed costs, payment fees, returns, discounts, and bundles, and build a repeatable Excel or Google Sheets pricing worksheet for reviewing every SKU.

Overview

Markup measures how much you add to cost. Gross margin measures how much of the selling price remains after the cost of goods sold. They are related, but they are not interchangeable.

The basic formulas are:

  • Markup percentage = (Selling price − Cost) ÷ Cost × 100
  • Gross margin percentage = (Selling price − Cost) ÷ Selling price × 100
  • Gross profit = Selling price − Cost

For example, a product costing $20 and selling for $30 has a $10 profit before other costs. Its markup is 50%, while its gross margin is 33.3%. The denominator changes: markup uses cost, while margin uses revenue.

For practical product pricing, “cost” should be defined carefully. A narrow gross margin calculation may use only product cost. A broader pricing model may include freight, packaging, payment processing, expected returns, marketplace fees, and other costs that vary with each sale. The result is often called contribution margin rather than accounting gross margin. Use consistent labels in your worksheet so a target margin is not applied to the wrong cost base.

How to estimate the required selling price

If your target is a traditional gross margin and your cost per unit is known, use:

Required price = Cost per unit ÷ (1 − Target gross margin)

With a unit cost of $21 and a 50% target gross margin:

$21 ÷ (1 − 0.50) = $42

A $42 selling price produces $21 of gross profit and a 50% gross margin before costs outside the selected cost definition.

When fees and allowances are calculated as a percentage of the selling price, include them in the denominator. A useful management formula is:

Required price = (Fixed unit costs + Fixed per-order fees) ÷ (1 − Target margin − Variable fee rate − Return allowance rate)

Here, fixed unit costs might include the supplier price, inbound shipping, customs or duties where applicable, packaging, and a per-unit fulfillment charge. Variable fees might include a payment percentage or marketplace commission. A return allowance can represent the expected cost of returns, refunds, replacements, or unsellable inventory. The allowance is an assumption, not a guarantee.

If the product will be discounted, first calculate the required realized price, then gross up the list price:

Required list price = Required realized price ÷ (1 − Discount rate)

A 20% discount means the customer pays 80% of the list price. Do not subtract 20 percentage points from the price; divide by 0.80 instead. The discount calculator guide can help compare sale prices and stacked promotions.

Inputs and assumptions for a product pricing calculator

A useful worksheet separates inputs from formulas. Create one row per SKU and include these fields:

  • Product cost: The supplier or manufacturing cost per unit.
  • Inbound freight: Shipping from the supplier to your storage or fulfillment location.
  • Packaging and preparation: Boxes, labels, inserts, assembly, or handling charged per unit.
  • Landed cost: Product cost plus directly attributable costs required to make the item available for sale.
  • Payment fee: Both the percentage rate and any fixed transaction fee.
  • Marketplace or channel fee: Include it only if the fee applies to the channel being modeled.
  • Return allowance: An estimated cost rate or amount based on your own records and stated assumptions.
  • Target margin: Identify whether this is gross margin, contribution margin, or another internal target.
  • Discount rate: Use an expected realized discount rather than the maximum advertised promotion unless that is your normal selling pattern.

Keep sales tax or VAT separate from operating revenue unless your business is not entitled to recover the tax. A tax-inclusive customer price is not automatically your net selling price. If a displayed price includes VAT at rate r, the net price is generally:

Tax-exclusive price = Tax-inclusive price ÷ (1 + r)

Tax treatment depends on location, registration status, product category, and transaction type, so use the applicable rules for your business rather than treating VAT as profit or cost by default. The professional invoice template guide provides a related way to organize taxes, discounts, and payment terms.

For bundles, allocate the total bundle price to each component only if you need SKU-level reporting. For pricing decisions, it is often clearer to calculate the bundle as one unit: add the costs of all included items, add bundle packaging and fulfillment costs, and apply fees to the actual bundle selling price. If one item is a free promotional component, record its cost rather than assigning it a zero cost.

Worked examples

Markup versus margin

Assume the complete product cost is $21:

Price methodCalculationSelling priceMarkupGross margin
50% markup$21 × 1.50$31.5050.0%33.3%
100% markup$21 × 2.00$42.00100.0%50.0%
50% target margin$21 ÷ 0.50$42.00100.0%50.0%

This is why “double the cost” and “reach a 50% margin” happen to produce the same price, while a 50% markup does not produce a 50% margin.

Adding payment fees and returns

Now assume the same $21 fixed cost, a $0.30 fixed payment fee, a 2.9% payment fee, and a 3% return allowance. If the target is a 50% contribution-style margin after those variable costs:

Required price = ($21 + $0.30) ÷ (1 − 0.50 − 0.029 − 0.03)

Required price = $21.30 ÷ 0.441 = approximately $48.30

At $48.30, the traditional gross margin using only the $21 product cost is about 56.5%, while the broader contribution-style result is approximately 50% after the stated fee and return assumptions. This distinction should appear in the worksheet heading.

Allowing for a planned discount

If the required realized price is $48.30 and the expected promotion is 20% off:

Required list price = $48.30 ÷ 0.80 = approximately $60.38

Round the customer-facing price only after checking the effect on the target. A psychological price such as $59.99 may be commercially useful, but it should be tested against the actual margin rather than assumed to work.

Excel and Google Sheets pricing worksheet

A simple worksheet can use these columns:

A: SKU; B: Product cost; C: Inbound cost; D: Packaging; E: Fixed fee; F: Variable fee rate; G: Return rate; H: Target margin; I: Discount rate; J: Required realized price; K: Required list price.

Example formulas for row 2 are:

  • J2: =(B2+C2+D2+E2)/(1-F2-G2-H2)
  • K2: =J2/(1-I2)

Format rates as percentages, protect formula columns, and add an input note explaining whether costs include VAT, shipping, fulfillment, and returns. Add a warning if the denominator is zero or negative, because the requested target cannot be reached under those assumptions. For larger catalogs, sort by margin shortfall, revenue, or unit volume so the most financially important SKUs receive attention first.

Review each SKU in this order: confirm the latest supplier cost, calculate landed cost, verify channel and payment fees, estimate returns and discounts, set the margin definition, calculate the required price, and compare it with customer and competitor constraints. If the price is not viable, test cost reduction, pack-size changes, channel changes, or a different product mix rather than silently lowering the target.

When to recalculate

Revisit the worksheet whenever supplier prices, freight, packaging, payment fees, marketplace fees, fulfillment charges, refund behavior, or promotional discounts change. A scheduled review is also useful when sales volume shifts materially, because fixed costs and bundle economics may be spread differently across orders.

Recalculate before launching a new SKU, renewing a supplier agreement, introducing a bundle, changing a fulfillment method, or running a major promotion. Compare the planned result with actual results after the promotion or sales period ends. Actual return rates, discounts, and fees can replace estimates in the next version.

For broader planning, connect SKU pricing to a break-even and tiered pricing planner, a rolling sales forecast, or a customer acquisition cost and lifetime value calculator. The immediate action is simple: define your cost base, enter current assumptions, calculate both margin and markup, then record the date and assumptions beside every pricing decision.

Related Topics

#gross margin#markup calculation#product pricing#ecommerce finance#spreadsheet templates
C

Calculation Shop Editorial Team

Business Metrics Editor

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.