Margin & Markup Calculator
Margin vs markup
Enter a cost and a revenue (sale price) to see the profit (revenue − cost), the gross margin (profit ÷ revenue × 100), and the markup (profit ÷ cost × 100). The two are easy to confuse: margin is the profit as a share of the sale price, while markup is the profit as a share of the cost. All three update live as you type and are shown to two decimal places as bare numbers.
A loss is valid — when revenue is below cost the profit and both percentages go negative. Gross margin is undefined when revenue is 0 and markup is undefined when cost is 0; those show — while the other figures still compute. An inline error appears instead of a result when either field is empty, non-numeric, or negative. Cost and revenue only: reverse-solving for a target margin, quantity or total profit, currency symbols and conversion, tax, and rounding rules are out of scope.