← All tools

Margin / Markup Calculator

Work out pricing from cost and profit targets, and convert between margin and markup — two measures of profit that are constantly confused. Gross margin is profit as a share of the selling price: (price − cost) ÷ price. Markup is profit as a share of cost: (price − cost) ÷ cost. They look similar but diverge fast: a 50% margin equals a 100% markup, and a 100% margin is impossible (it would need an infinite price). Solve for price from a target margin or a target markup, see profit and the counterpart metric, and look up the conversion table. Everything runs locally in your browser.

Cost
Selling price

Result

Margin ↔ Markup conversion

Margin vs markup. Both express the profit price − cost, but relative to a different base. Margin = profit ÷ price (how much of each dollar received is profit). Markup = profit ÷ cost (how much you add on top of cost). To price from a target margin use price = cost ÷ (1 − margin); from a target markup use price = cost × (1 + markup). To convert: markup = margin ÷ (1 − margin) and margin = markup ÷ (1 + markup). So 25% margin = 33.3% markup, 50% margin = 100% markup, and margin approaches (but never reaches) 100% as markup → ∞. The two are equal only at 0%. Pairs with the Discount, Loan, and Inflation calculators. Everything runs locally — nothing leaves your browser.