1. Scope
Converts revenue and cost inputs into gross margin, markup, and profit. It does not model variable versus fixed costs, fully-absorbed manufacturing overhead, tax, or currency effects — those belong to dedicated tools.
2. Inputs and outputs
Inputs
- revenue number (currency)
Net revenue per unit or period.
- cost number (currency)
Cost of goods sold, direct cost, or per-unit variable cost.
- mode enum default: margin
margin | markup | price-from-margin.
Outputs
- grossMargin
(revenue − cost) / revenue, expressed as a percentage.
- markup
(revenue − cost) / cost, expressed as a percentage.
- grossProfit
revenue − cost in currency terms.
Engine source: src/lib/profit-margin-calculator/engine.ts
3. Formula / scoring logic
gross_margin = (revenue - cost) / revenue
markup = (revenue - cost) / cost
gross_profit = revenue - cost 4. Assumptions
- Revenue and cost are entered in the same currency and time window.
- Cost covers direct/variable cost only. Allocated overhead is the user's responsibility.
- No tax, discount, or refund is netted out — compute those upstream.
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
- No benchmark layer: the tool does not judge whether the resulting margin is healthy for a given industry. Consult sector references (for example, NYU Stern's margin-by-industry dataset) separately.
- Does not distinguish gross margin from contribution margin or net margin; the label reflects the formula above, not US-GAAP line-item definitions.
- Rounding is display-only; internal math is double-precision.
7. Reproducibility
Input
revenue = 100, cost = 60, mode = margin.
Expected output
gross_margin = 40%, markup = 66.67%, gross_profit = 40.
8. Change log
- 2026-04-24 methodology page first published.
Worked example
Run live against the same engine this site ships
(/engines/profit-margin-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
- profit_margin_calculator
- cost
- 0
- desired_margin_percent
- 40
- cost_of_goods
- 60000
- operating_expenses
- 25000
- revenue
- 100000
Output
- revenue
- 100000
- cost
- 85000
- profit
- 15000
- grossMarginPercent
- 15
- markupPercent
- 17.65
Frequently asked questions
- What does the Profit Margin Calculator calculate?
- Converts revenue and cost inputs into gross margin, markup, and profit. It does not model variable versus fixed costs, fully-absorbed manufacturing overhead, tax, or currency effects — those belong to dedicated tools.
- What inputs does the Profit Margin Calculator need?
- It takes 3 inputs: revenue, cost, mode (default margin). Outputs returned: grossMargin, markup, grossProfit.
- What formula does the Profit Margin Calculator use?
- The exact computation is: gross_margin = (revenue - cost) / revenue; markup = (revenue - cost) / cost; gross_profit = revenue - cost
- Can I verify the Profit Margin Calculator with a worked example?
- Yes. With revenue = 100, cost = 60, mode = margin. the tool returns gross_margin = 40%, markup = 66.67%, gross_profit = 40.
- Does the Profit Margin 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 Calculator not tell me?
- Known limitations: No benchmark layer: the tool does not judge whether the resulting margin is healthy for a given industry. Consult sector references (for example, NYU Stern's margin-by-industry dataset) separately. Does not distinguish gross margin from contribution margin or net margin; the label reflects the formula above, not US-GAAP line-item definitions. Rounding is display-only; internal math is double-precision.