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.
Margin Calculator
Results update instantly as you type
Enter Values
Embed Code
Copy and paste this HTML snippet into any web page to embed this calculator directly.
<iframe src="http://127.0.0.1:54963/embed/ecommerce/margin-calculator?ref=embed" title="Margin Calculator — Gross Margin, Markup, Cost & Price (Solve Any Variable)" width="100%" style="max-width:600px; border:none; height:500px;" loading="lazy"></iframe>
Direct Link
Share this link to let others open the calculator in their browser.
The Formula
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
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 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.
Cost of Goods Sold
The direct cost to produce or purchase one unit. Includes materials, manufacturing, and in e-commerce: product cost + inbound shipping.
Selling Price
The price the customer pays. In retail/e-commerce, this is the list price before any discounts or fees.
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
Select what you want to solve for using the "Solve For" dropdown.
- 2
To find your margin or markup: enter Cost and Revenue, then select Gross Margin or Markup.
- 3
To find the right selling price: enter Cost and either your target Margin % or Markup %, then select Revenue.
- 4
To find your allowable cost: enter Revenue and either your target Margin % or Markup %, then select Cost.
- 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
Sources & References
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
