Shopify Margin Calculator: Gross Margin vs Markup Explained

Gross margin and markup are two different ways to express the same profit. On a product that costs $20 and sells for $50, the gross margin is 60% and the markup is 150%. Confusing these two metrics leads to systematic underpricing — a 50% markup only gives you a 33.3% margin. This calculator shows both values so you can price correctly and evaluate profitability accurately.

  1. The Difference: Margin vs Markup
  2. Calculation Formulas
  3. How to Use the Calculator
  4. Worked Examples
  5. Pricing Strategy: Keystone and Beyond
  6. Margin to Markup Conversion Table
  7. Frequently Asked Questions

The Difference: Margin vs Markup

Gross margin expresses profit as a percentage of the selling price. It answers: "What percentage of my revenue is profit?"

Markup expresses profit as a percentage of the cost. It answers: "How much did I mark up the cost to arrive at the price?"

Both use the same dollar amount (Selling Price − Cost), but divide by different bases. This produces different percentages:

  • $20 cost, $50 price → Profit = $30
  • Gross Margin = $30 ÷ $50 = 60%
  • Markup = $30 ÷ $20 = 150%

The critical mistake: A seller who wants a "50% margin" and applies a "50% markup" to a $20 product prices it at $30. But $30 − $20 = $10 profit, and $10 ÷ $30 = only 33.3% margin — not the 50% they intended. They've underpriced by $10 per unit.

Calculation Formulas

Gross Margin = ((Selling Price − Cost) ÷ Selling Price) × 100

Markup = ((Selling Price − Cost) ÷ Cost) × 100

To find price from a target margin: Selling Price = Cost ÷ (1 − Margin)

To find price from a target markup: Selling Price = Cost × (1 + Markup)

How to Use the Calculator

  1. Enter your Selling Price — the price customers pay
  2. Enter your Product Cost — the cost to produce or purchase the item
  3. Click Calculate Margin to see both gross margin and markup

The calculator returns both values simultaneously. Use gross margin to evaluate profitability, and markup to set prices from cost.

Worked Examples

Example 1: T-Shirt (Cost $8, Price $25)

Metric Calculation Result
Dollar Profit $25 − $8 $17
Gross Margin $17 ÷ $25 68%
Markup $17 ÷ $8 212.5%

A 68% gross margin on a t-shirt is excellent. This leaves room for payment fees ($0.73), shipping ($3–5), and ads ($3–5) while maintaining a 30–40% net margin.

Example 2: Electronics Accessory (Cost $35, Price $50)

Metric Calculation Result
Dollar Profit $50 − $35 $15
Gross Margin $15 ÷ $50 30%
Markup $15 ÷ $35 42.9%

A 30% gross margin on electronics is tight. After payment fees ($1.75), shipping ($4), and ads ($7.50), net margin drops to about 3.5% — barely profitable. This product needs a price increase.

Example 3: Digital Course (Cost $0, Price $99)

Metric Calculation Result
Dollar Profit $99 − $0 $99
Gross Margin $99 ÷ $99 100%
Markup N/A

Digital products have 100% gross margin (no COGS). The only costs are payment fees and marketing, making net margins typically 70–90%.

Pricing Strategy: Keystone and Beyond

Keystone Pricing — Double the cost (100% markup, 50% margin):

  • $20 cost → $40 price
  • Simple to calculate, widely used in retail
  • Produces a 50% gross margin

Premium Pricing — 2.5x to 3x cost (150–200% markup, 60–67% margin):

  • $20 cost → $50–$60 price
  • Better for products with high perceived value
  • Leaves more room for ads and promotions

Cost-Plus Pricing — Cost + fixed dollar amount:

  • $20 cost + $15 = $35 price
  • Simple but doesn't account for market demand
  • Produces a 42.9% margin

Value-Based Pricing — Price based on customer perception, not cost:

  • $20 cost → $80 price (if customers perceive $80 value)
  • Maximizes profit when brand and differentiation are strong
  • Requires market research

Margin to Markup Conversion Table

Target Margin Required Markup Example ($20 cost)
20% 25% $20 → $25
30% 42.9% $20 → $28.57
40% 66.7% $20 → $33.33
50% 100% $20 → $40
60% 150% $20 → $50
70% 233% $20 → $66.67
80% 400% $20 → $100

Use this table when setting prices: find your target margin in the left column, apply the corresponding markup to your cost, and you'll get the correct selling price.

Formula for conversion:

  • Markup = Margin ÷ (1 − Margin)
  • Margin = Markup ÷ (1 + Markup)

People Also Ask

Margin is profit as a percentage of selling price. Markup is profit as a percentage of cost. On a $20 cost and $50 price: margin = 60%, markup = 150%. They use the same dollar profit ($30) but divide by different bases (price vs. cost).
Last updated: July 21, 2026

This tool is for informational and educational purposes only. It is not financial advice. Always consult a qualified financial advisor before making investment, loan, or tax decisions. Results are estimates and actual terms may vary.

Ad