Published methodology
Formulas and accuracy checks
The calculator uses standard relationships between cost, selling price, profit, margin and markup. It solves from the two most recently entered independent values and never invents a monetary scale when only percentages are supplied.
Definitions
- Profit
- Selling price minus cost.
- Profit margin
- Profit divided by selling price.
- Markup
- Profit divided by cost.
Core formulas
Profit = Selling price − Cost
Profit margin (%) = Profit ÷ Selling price × 100
Markup (%) = Profit ÷ Cost × 100
Selling price from margin = Cost ÷ (1 − Margin / 100)
Selling price from markup = Cost × (1 + Markup / 100)
Margin from markup = Markup ÷ (1 + Markup)
Markup from margin = Margin ÷ (1 − Margin)
Published accuracy tests
These cases check direct calculations, reverse calculations and a loss. Displayed answers are rounded to two decimal places.
| Inputs | Expected result |
|---|---|
| Cost 120, Selling price 160 | Profit 40.00, Margin 25.00%, Markup 33.33% |
| Cost 80, Selling price 100 | Profit 20.00, Margin 20.00%, Markup 25.00% |
| Cost 120, Margin 25% | Selling price 160.00, Profit 40.00, Markup 33.33% |
| Cost 100, Markup 50% | Selling price 150.00, Profit 50.00, Margin 33.33% |
| Selling price 100, Margin 30% | Cost 70.00, Profit 30.00, Markup 42.86% |
| Cost 120, Selling price 100 | Profit −20.00, Margin −20.00%, Markup −16.67% |
Precision and validation
The calculator keeps full numerical precision while calculating. Money and percentage results are displayed to two decimal places. Invalid divisions and input pairs that imply a negative cost or selling price are stopped before a result is shown, so the page never displays Infinity or NaN. A non-negative selling price below cost is correctly shown as a loss.
Currency, sharing and privacy
Currency selection changes the symbol and local number formatting. It does not perform foreign exchange conversion. Calculations run in the browser and are not submitted to this site. If you choose Copy calculation link, the two supplied values are intentionally included in the URL so the same calculation can be opened elsewhere.
Read the privacy informationFormula review
Formulas, derived-value validation and all six published test cases were reviewed on August 28, 2026. This page is updated when calculation logic changes.