Description
Compute (price - fixedDiscount) × (1 - fractionDiscount) and price × (1 - fractionDiscount) - fixedDiscount.
Fixed and percentage discounts act differently and may produce different prices when their order changes. Threshold pricing also depends on whether a new rate applies to all units.
Compute (price - fixedDiscount) × (1 - fractionDiscount) and price × (1 - fractionDiscount) - fixedDiscount.
When to use this tool
Use Offer Stack Order Difference when you need a transparent promotional price or eligibility term.
How to use the tool and how it works
- Enter price, fixedDiscount, fractionDiscount. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read fixedThenFraction, fractionThenFixed, difference. Use the output convention below.
Compute (price - fixedDiscount) × (1 - fractionDiscount) and price × (1 - fractionDiscount) - fixedDiscount. Return fixedDiscount × fractionDiscount as their difference.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| price | Price | Required. Finite number; minimum 0. |
| fixedDiscount | Fixed Discount | Required. Finite number; minimum 0. |
| fractionDiscount | Fraction Discount | Required. Finite number; minimum 0; maximum 1. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| fixedThenFraction | Fixed Then Fraction | Required. Finite number. |
| fractionThenFixed | Fraction Then Fixed | Required. Finite number. |
| difference | Fixed-then-fraction price minus fraction-then-fixed price. | Required. Finite number. |
{
"input": {
"price": 100,
"fixedDiscount": 10,
"fractionDiscount": 0.2
},
"output": {
"fixedThenFraction": 72,
"fractionThenFixed": 70,
"difference": 2
}
} Limitations and assumptions
- Prices are not floored at zero and the fixed discount can exceed price; retailer eligibility, tax, and rounding rules are not modeled.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Check actual offer terms, item eligibility, taxes, and monetary rounding before applying a computed price.
References
Similar or alternative tools
- Coupon Stack Percent Fixed Order Gap
Compute fixed-then-percent and percent-then-fixed final prices, requiring fixedDiscount no greater than price.
- Offer Discount Stack Factor
Multiply all factors (1 - discountFraction) for remainingFactor and multiply basePrice by that product for finalPrice.