Profit Margin Calculator
Calculate profit margin.
Runs locally in your browser
Your inputs are processed locally in your browser and are not uploaded or stored by us.
Calculate profit and profit margin percentage based on revenue and cost.
How to calculate profit margin
- Enter the total revenue generated.
- Enter the total cost incurred.
- Click "Calculate" to determine the profit amount and profit margin percentage.
Profit Margin Formula
profit = revenue − cost
profit margin % = (profit / revenue) × 100
Profit is simply the difference between revenue and cost. Profit margin divides that profit by the revenue (not the cost) and multiplies by 100 to represent the profit as a percentage of total sales.
Calculating profit margin
Revenue100
Cost60
Profit = 100 − 60 = 40
Profit margin = (40 / 100) × 100
Result: Profit = 40, Profit margin = 40%
Notes
- Revenue must be strictly greater than zero to avoid division by zero. Cost must be 0 or greater.
- Losses are mathematically valid: if Revenue is 100 and Cost is 120, the Profit is -20 and the Profit margin is -20%.
- Break-even scenarios are supported: if Revenue is 100 and Cost is 100, the Profit is 0 and the Margin is 0%.
- Profit margin is distinct from markup. Profit margin divides profit by revenue, whereas markup divides profit by cost.
- Calculations use JavaScript floating-point numbers, so some decimal results may be approximate.
- Your calculator inputs are processed locally in your browser and are not uploaded or stored by us.