Gross margin uses revenue

Use gross margin = (selling price − cost) ÷ selling price × 100. For a sale price of 100 and a direct cost of 60, gross profit is 40 and margin is 40 ÷ 100 × 100 = 40%. Margin describes the share of revenue left after the cost included in the calculation. It does not automatically mean net profit or cash retained.

Markup uses cost

Use markup = (selling price − cost) ÷ cost × 100. The same 40 of profit divided by 60 of cost equals about 66.67%. Markup describes how much was added relative to cost. Because cost is the denominator, markup is undefined when cost is zero even though a margin may still be calculated from a positive selling price.

Do not set price with the wrong formula

Adding a 40% markup to a cost of 60 gives a price of 84 and a margin of only about 28.57%. To target a 40% margin, convert 40% to 0.40 and use price = cost ÷ (1 − target margin): 60 ÷ 0.60 = 100. A target margin of 100% makes the denominator zero, so no finite price follows from this simple model.

Keep scope explicit

Decide what 'cost' means before comparing results. A direct item cost may exclude freight, payment fees, labor, spoilage, returns, discounts, tax, or allocated overhead. Selling price may be tax-inclusive or tax-exclusive. The calculator uses only the two entered numbers and does not apply an accounting policy. Use consistent definitions across products and periods, and consult an appropriate professional for reporting decisions.

Read negative profit correctly

When selling price is below cost, gross profit is negative and both margin and markup are negative. For cost 80 and price 60, profit is −20, margin is −33.33%, and markup is −25%. Those values are not interchangeable, and they do not account for any later rebate or fixed overhead. Verify that a discount was applied to the intended starting price before diagnosing the loss.

Troubleshoot mismatched reports

If another report disagrees, inspect the denominator first. A value labeled 'margin' may actually be markup, or one source may use net revenue after discounts while another uses list price. Check currency and tax treatment, confirm that cost and price cover the same quantity, and compare the displayed substitution. Rounding should happen after the calculation; prematurely rounding profit or a conversion rate can create small differences.