1. Scope
A lookup between margin, markup, and discount. It converts any one of the three plus cost or list price into the others. It does not compute multi-step trade discounts or cumulative retailer markups across a chain.
2. Inputs and outputs
Inputs
- mode enum
margin | markup | discount.
- cost number (currency)
- price number (currency)
- percent percent
The target margin, markup, or discount depending on mode.
Outputs
- margin
(price − cost) / price.
- markup
(price − cost) / cost.
- discountedPrice
price × (1 − discount).
Engine source: src/lib/margin-markup-discount-calculator/engine.ts
3. Formula / scoring logic
margin = (price - cost) / price
markup = (price - cost) / cost
discounted_price = list_price * (1 - discount_rate) 4. Assumptions
- Inputs share currency and time window.
- Discount is applied to a single list price — multi-tier trade discounts (distributor → retailer → consumer) are not modelled.
5. Data sources
This tool relies on user inputs and standard arithmetic; no external benchmark data is bundled. When a question depends on an industry reference (for example, typical churn rates or hourly-wage medians), the linked adjacent tools cite their primary sources on their own methodology pages.
6. Known limitations
- Ignores tax and fee layers (VAT, platform fees). Net those out before entry.
- Rounding is cosmetic. The underlying math is double-precision.
7. Reproducibility
Input
cost = $40, price = $100, mode = margin.
Expected output
margin = 60%, markup = 150%.
8. Change log
- 2026-04-24 methodology page first published.
Worked example
Run live against the same engine this site ships
(/engines/margin-markup-discount-calculator.js).
The inputs and outputs below are recomputed on every build and
independently re-verified in CI — they are never hand-authored.
Input
- tool
- margin_markup_discount
- mode
- margin_to_price
- cost
- 40
- margin_percent
- 35
Output
- mode
- margin_to_price
- cost
- 40
- salePrice
- 61.54
- grossProfit
- 21.54
- marginPercent
- 35
- markupPercent
- 53.85
- formulaTrace
- sale_price = cost / (1 - margin_percent/100)
- assumptionsEcho.mode
- margin_to_price
- assumptionsEcho.cost
- 40
- assumptionsEcho.inputMarginPercent
- 35
Frequently asked questions
- What does the Profit Margin / Markup / Discount Calculator calculate?
- A lookup between margin, markup, and discount. It converts any one of the three plus cost or list price into the others. It does not compute multi-step trade discounts or cumulative retailer markups across a chain.
- What inputs does the Profit Margin / Markup / Discount Calculator need?
- It takes 4 inputs: mode, cost, price, percent. Outputs returned: margin, markup, discountedPrice.
- What formula does the Profit Margin / Markup / Discount Calculator use?
- The exact computation is: margin = (price - cost) / price; markup = (price - cost) / cost; discounted_price = list_price * (1 - discount_rate)
- Can I verify the Profit Margin / Markup / Discount Calculator with a worked example?
- Yes. With cost = $40, price = $100, mode = margin. the tool returns margin = 60%, markup = 150%.
- Does the Profit Margin / Markup / Discount Calculator bundle any external benchmark data?
- No. It runs standard arithmetic on the values you enter; no external benchmark dataset is bundled. Industry references, where relevant, are cited on the adjacent tools' methodology pages.
- What can the Profit Margin / Markup / Discount Calculator not tell me?
- Known limitations: Ignores tax and fee layers (VAT, platform fees). Net those out before entry. Rounding is cosmetic. The underlying math is double-precision.