Calculate your profit, gross margin, and markup percentage based on the cost and selling price of a product.
A margin calculator computes the profit, gross margin percentage, and markup percentage for a product or service based on its cost and selling price. Margin and markup are related but different ways of expressing profitability — margin is profit as a percentage of the selling price, while markup is profit as a percentage of the cost — and confusing the two is a common pricing mistake for small businesses.
Profit is simply the difference between selling price and cost. Margin expresses that profit as a share of the selling price, while markup expresses it as a share of the cost — the same dollar profit produces two different percentages depending on which base you use.
Formula: Profit = Selling Price − Cost Price. Gross Margin % = (Profit ÷ Selling Price) × 100. Markup % = (Profit ÷ Cost Price) × 100.
Example: For a product with a $50 cost price and an $80 selling price, the profit is $30. The gross margin is $30 ÷ $80 = 37.5%, while the markup is $30 ÷ $50 = 60% — the same $30 profit, but expressed as two very different percentages. (Note: all figures in this example are for illustration purposes only.)
Margin and markup are easy to confuse because they describe the same profit using different denominators — margin is always a smaller percentage than markup for the same profit (when profit is positive), because the selling price is always larger than the cost price. Pricing strategies often start from a target margin (e.g., "we want 40% gross margin on this product line") and work backward to determine the markup needed on cost to achieve that margin — these aren't interchangeable, and using the wrong one when setting prices can result in lower-than-expected profitability. Margin percentages are also commonly used in financial statements and industry benchmarks for comparing profitability across businesses.
Margin is profit divided by the selling price, while markup is profit divided by the cost price. For the same dollar profit, markup is always a higher percentage than margin (assuming positive profit), because cost is lower than selling price.
The formula is: Markup % = Margin % ÷ (1 − Margin %). For example, a 50% margin requires a 100% markup on cost ((50% ÷ (1 − 0.5)) = 100%), while a 25% margin requires roughly a 33% markup.
Gross margin is the percentage of revenue remaining after subtracting the direct cost of producing or acquiring a product or service (cost of goods sold). It doesn't account for other business expenses like rent, salaries, or marketing — those are deducted later to calculate net profit margin.
Yes. If the selling price is lower than the cost price, profit is negative, resulting in a negative margin — meaning the item is sold at a loss.
Typical gross margins vary enormously by industry — retail, manufacturing, software, and services businesses all have very different cost structures and typical margin ranges. Compare your margin to benchmarks for your specific industry rather than a general number.
No. This calculator computes gross margin and markup based on cost price and selling price only. Taxes, overhead, marketing, and other operating expenses would further reduce your overall net profitability and aren't included here.
Disclaimer: The information and figures provided on this page are for educational and illustrative purposes only and do not represent specific business advice. Pricing strategies should account for your full cost structure, market conditions, and competitive landscape. Always consult a qualified accountant or business advisor before making pricing decisions.