Free tool
Margin calculator
Margin calculator works out gross profit, margin, markup and target selling price from cost and revenue for sellers checking product pricing. Enter cost and price to compare margin with markup, or enter cost and a target margin to solve for price.
- Free to use
- No sign-up
- Formula shown
- Updated as you type
Your numbers
Estimated margin
40%
- Cost
- $30.00
- Price
- $50.00
- Profit
- $20.00
- Markup
- 66.67%
Margin divides profit by price; markup divides the same profit by cost, which is why the two percentages differ.
Use this in the free planning spreadsheet
How to find the price for a target margin
Divide cost by one minus the target margin as a decimal: a $30 cost at a 40% target margin needs a $50 selling price.
The calculation is $30 ÷ (1 − 0.40) = $50. Adding 40% to cost instead gives $42, leaving only $12 of profit and a 28.6% margin. Before choosing a price, check that cost includes the purchase price and the landed costs appropriate to your product. Then consider the market price, channel expenses and discounts separately. If a planned promotion reduces a $50 price by 10%, the new $45 revenue leaves $15 profit on the same $30 cost, or a 33.3% margin. A target margin sets a pricing constraint; it does not prove customers will accept the price or that all business expenses are covered.
Margin vs markup at a glance
A 20% margin is a 25% markup, a 33.3% margin is about a 50% markup, a 40% margin is a 66.7% markup, and a 50% margin is a 100% markup.
Both ratios describe the same profit dollars with different denominators. Write the denominator into a buying or pricing policy so someone using the sheet later knows whether 40 means a share of sales or an addition to cost. For example, doubling a $25 cost produces a $50 price: that is a 100% markup and a 50% margin. When comparing multiple SKUs, calculate total gross profit divided by total revenue for the combined margin. A simple average of SKU margin percentages gives a tiny seller the same weight as a large seller and can misstate the overall result. Keep the linked GMROI measure separate too: it compares gross margin dollars with average inventory investment, rather than revenue.
Gross margin formula
Gross margin % = (net sales − cost of goods sold) ÷ net sales × 100, using revenue and costs for the same item or period.
For a simple batch of 100 identical units sold at $50 with $30 unit cost, net sales are $5,000, cost of goods sold is $3,000 and gross profit is $2,000: the gross margin remains 40%. If a discount or return changes recognized revenue, update the revenue and corresponding cost treatment before comparing periods. Use prices net of sales tax collected on behalf of a tax authority so the tax does not masquerade as revenue. Match currencies and use a consistent landed-cost basis across imported and domestic products. The optional quantity field multiplies the entered per-unit profit; it does not model mixed prices, partially returned orders, or separate tax accounting.
Profit margin formula: margin, markup, price
Profit = price − cost
Margin = profit ÷ price
Markup = profit ÷ cost
Price = cost ÷ (1 − margin)
- Cost
- What the item costs you.
- Price
- What you sell it for, entered here as revenue.
- Profit
- Price minus cost, in dollars.
- Margin
- Profit as a percentage of price. The standard reading of "margin".
- Markup
- Profit as a percentage of cost. The same profit dollar, a different denominator, and always a bigger percentage than margin when there is a profit.
Worked example
- An item costs $30 and sells for $50, so profit is $50 − $30 = $20.
- Margin divides profit by the selling price: $20 ÷ $50 = 40%.
- Markup divides the same profit by cost instead: $20 ÷ $30 = 66.67%, a different number from the same sale.
- Working the other way, a 40% target margin on a $30 cost needs a price of $30 ÷ (1 − 0.4) = $50.
When it applies
- Per-unit or per-order profitability where cost and price are both known and stable enough to check as a set.
- Comparing pricing across SKUs, channels or over time using margin and markup on a consistent basis.
- Setting a price from a target margin when cost is known and the price is not yet fixed.
When it breaks down
- As a complete profitability measure if selling fees or outbound shipping are omitted. Use revenue after discounts and returns, and include inbound freight and duty in landed product cost; keep the cost basis labelled.
- As a business-wide profitability figure. Product margin is not net margin, which nets out operating expenses below gross profit.
- When margin and markup are used interchangeably. The same profit dollar reads as a different percentage of cost than of price, and mixing the two misprices the next item.
Common mistakes
Pricing at cost × (1 + margin %)
That formula computes markup, not margin. A target 40% margin needs price = cost ÷ (1 − 0.40), not cost × 1.40, or the realized margin comes in short.
Leaving landed costs out of cost
Freight, duty and other landed costs belong in cost before margin is calculated. Leaving them out overstates margin on every imported or freight-heavy item.
Confusing gross margin with net margin
Gross margin is price minus the direct cost of the item. Net margin also nets out operating expenses. A healthy gross margin can still sit under a thin or negative net margin.
Questions
What does a margin calculator tell me?
A margin calculator shows how much of a selling price remains after the cost you enter, as gross profit dollars and a percentage of revenue. Enter cost and price to compare margin with markup, or choose a target margin to solve for a selling price or allowable cost. A $30 cost and $50 sale leave $20 gross profit, a 40% margin and a 66.7% markup. Optional quantity scales gross profit across identical units. Read the result as product economics on your chosen cost basis: it does not automatically include overhead, channel fees, tax or future returns.
What is a good profit margin?
A good profit margin covers the costs excluded from the calculation and still leaves enough to support the business. There is no universal percentage for every product or channel. A direct sale and a wholesale sale can have different prices, fulfillment costs and selling expenses. Compare like with like: gross margin against gross margin, using the same treatment of freight, duty, discounts and returns. Then check the operating expenses that gross profit must fund. A high percentage on an item that rarely sells may contribute less cash than a lower percentage on a frequently purchased item.
What is the profit margin formula?
Profit margin % = (price − cost) ÷ price × 100. At $50 revenue and $30 cost, profit is $20 and margin is 20 ÷ 50 × 100 = 40%. To solve for a target price, use cost ÷ (1 − target margin as a decimal). For a 40% target, divide $30 by 0.60 to get $50. Enter 40 in the percentage field, not 0.40. The displayed price is rounded to cents, so a target that produces a fractional cent can yield a slightly different realized margin after rounding.
What is the difference between profit margin and markup?
Margin divides profit by selling price; markup divides the same profit by cost. At a $30 cost and $50 price, the same $20 profit is 40% of price and 66.7% of cost. Adding 40% to $30 produces a $42 price and only a 28.6% margin, so using a markup rule to meet a margin target underprices the item. The conversion is markup = margin ÷ (1 − margin), using decimal fractions. A 50% margin therefore needs a 100% markup. Use the linked markup calculator when cost-plus pricing is the starting point.
Gross margin vs net profit margin: what is the difference?
Gross margin uses revenue less cost of goods sold; net profit margin also reflects the other expenses needed to run the business. This calculator only knows the cost figure you enter. If that figure is product cost, the result is a product gross margin estimate. If you add marketplace commissions or outbound delivery costs, label the result according to those inclusions so colleagues can compare it consistently. Do not call it accounting gross margin without checking the cost classification, or net margin while salaries, rent, interest and other business expenses remain outside the calculation.
Can profit margin be negative or undefined?
Yes. A $50 sale against $60 cost loses $10, giving a −20% margin and about −16.7% markup. A zero selling price has no defined margin because the formula divides by price; the calculator requires a positive price for that calculation. A zero cost with a positive price gives 100% margin, but markup is undefined because its denominator is zero. An unknown cost is different from a confirmed zero cost: enter the actual cost before using the result to price inventory. Quantity changes total profit dollars, not the per-unit percentage.
Related
Published by Skuvelo. Results are estimates computed from the figures you enter, not a reading of your own sales or stock.
A calculator answers once. Skuvelo keeps answering.
This tool computes one number from what you type. Skuvelo computes it continuously, for every SKU, from your own sales and stock.