Calculators
Discount margin impact & break-even units API
Compute net price after a discount, margin erosion, and the break-even unit multiplier (oldUnitMargin / newUnitMargin) needed to hold gross profit flat. Deterministic. Answers 'how many extra units must I sell to break even on a discount','what does a 20% discount do to my margin'.
Price$0.01per request
MethodPOST
Route/v1/calc/ecom-discount-impact
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
ecomdiscountmarginpricingbreakevenpromotionecommercecalc
API URL
Integration docshttps://x402.hexl.dev/v1/calc/ecom-discount-impactExample request
{
"listPrice": 100,
"unitCost": 60,
"discountPercent": 20,
"baselineUnits": 1000
}Example response
{
"formula": "netPrice = listPrice × (1 − discount); breakevenUnitMultiplier = oldUnitMargin / newUnitMargin",
"listPrice": 100,
"unitCost": 60,
"discountPercent": 20,
"netPrice": 80,
"oldUnitMargin": 40,
"newUnitMargin": 20,
"newMarginPercent": 25,
"marginErosionPercent": 50,
"breakevenUnitMultiplier": 2,
"extraUnitsPercentNeeded": 100,
"baselineUnits": 1000,
"breakevenUnits": 2000
}Input schema
{
"type": "object",
"required": [
"listPrice",
"unitCost",
"discountPercent"
],
"properties": {
"listPrice": {
"type": "number",
"examples": [
100
]
},
"unitCost": {
"type": "number",
"examples": [
60
]
},
"discountPercent": {
"type": "number",
"description": "0-100",
"examples": [
20
]
},
"baselineUnits": {
"type": "number",
"description": "Optional baseline units to compute break-even units",
"examples": [
1000
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}