Skip to main contentSkip to secondary navigation
HomeecommerceMargin Calculator

Margin Calculator — Gross Margin, Markup, Cost & Price (Solve Any Variable)

Solve for Gross Margin %, Markup %, Cost, or Revenue — choose what you know and calculate what you need. See why 50% markup does not equal 50% margin, and get the exact gross profit in dollars.

✓ Formula verified: January 2026
🛒

Margin Calculator

Results update instantly as you type

Enter Values

$
$
%
%

The Formula

Margin % = (Revenue − Cost) ÷ Revenue × 100 | Markup % = (Revenue − Cost) ÷ Cost × 100

Gross margin measures profit as a share of revenue (the selling price). Markup measures profit as a share of cost. These two percentages are mathematically related but are never equal unless profit is zero. The conversion formula is: Margin % = Markup % ÷ (100 + Markup %) and Markup % = Margin % ÷ (100 − Margin %).

Variable Definitions

Margin %

Gross Profit Margin

Profit divided by revenue. Tells you what fraction of each dollar of sales is profit. A 40% margin means $0.40 of every $1.00 in revenue is gross profit.

Markup %

Markup Percentage

Profit divided by cost. Tells you how much above cost you are pricing the item. An 80% markup means you charge 80% more than what the item costs you.

COGS

Cost of Goods Sold

The direct cost to produce or purchase one unit. Includes materials, manufacturing, and in e-commerce: product cost + inbound shipping.

Revenue

Selling Price

The price the customer pays. In retail/e-commerce, this is the list price before any discounts or fees.

Gross Profit

Gross Profit (Dollars)

Revenue minus COGS, expressed in dollars. This is the absolute profit before operating expenses. A 40% margin on a $100 item yields $40 of gross profit per unit.

How to Use This Calculator

  1. 1

    Select what you want to solve for using the "Solve For" dropdown.

  2. 2

    To find your margin or markup: enter Cost and Revenue, then select Gross Margin or Markup.

  3. 3

    To find the right selling price: enter Cost and either your target Margin % or Markup %, then select Revenue.

  4. 4

    To find your allowable cost: enter Revenue and either your target Margin % or Markup %, then select Cost.

  5. 5

    All four results (cost, revenue, margin, markup) are shown together so you can see the full picture at once.

Common Applications

  • Setting retail or wholesale prices by calculating the correct selling price from cost and your desired margin percentage
  • Avoiding costly pricing mistakes by understanding the difference between margin and markup when negotiating with buyers
  • Determining the maximum allowable product cost to hit a target margin at a given market selling price
  • Converting between margin and markup percentages for accurate financial reporting and pricing strategy decisions

Gross margin is the portion of revenue left after subtracting cost

Understanding the Concept

The single most common mistake in retail and e-commerce pricing is treating margin and markup as the same number. They are not — and confusing them leads to systematic under-pricing that quietly destroys profitability. Here is the core math: if your cost is $50 and you apply a 50% markup, your price is $75 and your margin is 33.3% — not 50%. Why? Because margin is calculated on the selling price ($25 profit ÷ $75 = 33.3%), while markup is calculated on cost ($25 profit ÷ $50 = 50%). Same $25 profit, two completely different percentages. This matters most when communicating with buyers, wholesale partners, or platforms. A buyer might ask for "50% margin" and you quote "50% markup" — you have just accepted a deal that pays you far less than expected. Conversion formulas: Margin from Markup: Margin % = Markup % ÷ (100 + Markup %) Markup from Margin: Markup % = Margin % ÷ (100 − Margin %) Example: 80% markup → 80 ÷ 180 = 44.4% margin. 50% margin → 50 ÷ 50 = 100% markup. For e-commerce specifically, gross margin only tells part of the story. After platform fees (Amazon ~15%, Shopify payments ~2.9%), shipping, returns (~5-20% in apparel), and ad spend (often 20-40% of revenue as TACOS/ACOS), net margin is often 5-15% of what gross margin suggests. Always model your full P&L, not just your margin.

Frequently Asked Questions

Related Calculators

Reviews

No reviews yet. Be the first to share your experience with Margin Calculator — Gross Margin, Markup, Cost & Price (Solve Any Variable).

Write a Review

Your Rating *

0/1000

0/50

Related Calculators

Medical Disclaimer: The health and fitness calculators on this site are for informational and educational purposes only. They are not a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider with any questions about your health.

Financial Disclaimer: The finance calculators on this site are for informational purposes only and do not constitute financial advice. Results are estimates based on the inputs provided and may vary. Consult a qualified financial advisor before making investment or financial decisions.

© 2026 TheCalcUniverse. All results are for informational purposes only.

Fast, free, and privacy-first.