Free tool
Gross Margin Calculator
See how much of your selling price is left after product cost.
Use this gross margin calculator to measure a product at a known selling price. Enter the amount you actually receive for the item after any discount, alongside its matched product cost. The result shows gross profit in money and gross margin as a share of revenue.
A product can have a healthy gross margin and still leave little after fulfillment, payment fees, returns and customer acquisition. Start here to understand the product spread. Use the Contribution Margin Calculator when you need to include the variable costs of making the sale. The Product Profit & Pricing Calculator puts that margin in the wider pricing decision.
One product · Matched price and cost · Before other selling costs
Per-unit economics
Use a consistent scope and cost basis for every figure.
The example is illustrative. Replace it with your own figures; results update as you type. Your entries stay in this page until you choose to copy them.
Need help finding your figures in Shopify?
Copy an input checklist for Sidekick. Store reports may not contain every cost or scenario assumption; verify the source and mark missing figures rather than guessing.
How this tool works
How gross margin is calculated
Gross profit is selling price less product cost. Gross margin divides that amount by the selling price. A sale below product cost produces negative gross profit and a negative margin; the calculator keeps that result visible.
Keep the basis consistent: compare a unit price with unit cost, in the same currency and with the same treatment of tax. Include the landed product costs you intend to measure. Selling price must be above zero for a percentage margin to exist. Markup uses product cost as its denominator, so its percentage will differ.
Gross profit = selling price − product cost. Gross margin = gross profit ÷ selling price × 100.
A $100 item with a $40 product cost
At a realized selling price of $100 and product cost of $40, gross profit is $60 and gross margin is 60%. The same $60 spread is a 150% markup on cost. Selling costs and fixed overhead still need to be covered.
Your full calculation
| Measure | Result · USD |
|---|---|
| Net selling price | $100.0 |
| Product cost | $40.0 |
| Gross profit per unit | $60.0 |
| Gross margin | 60% |
| Markup on cost | 150% |
Questions & answers
Understanding your result
How do you calculate gross margin?
Subtract product cost from selling price, divide the difference by selling price, then multiply by 100. For period totals, the equivalent calculation uses revenue and matched cost of goods sold. Keep unit and period figures separate.
How to calculate a 30% gross margin?
A 30% gross margin means product cost is 70% of selling price. Divide cost by 0.7 to find the required price. A $70 product cost therefore needs a $100 price before other selling costs. The Selling Price Calculator helps test a target price.
What does a 30% gross margin mean?
It means 30 cents of each dollar of revenue remain after the product costs included in the calculation. That amount must still cover any excluded fulfillment, marketing, payment, overhead and other costs.
Why is gross margin different from markup?
Both use the difference between price and product cost, but gross margin divides by price and markup divides by cost. A $100 price and $60 cost produce a 40% margin and a 66.7% markup. A zero cost leaves the markup percentage undefined.
