Description
Compute fixed-then-percent and percent-then-fixed final prices, requiring fixedDiscount no greater than price.
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 fixed-then-percent and percent-then-fixed final prices, requiring fixedDiscount no greater than price.
When to use this tool
Use Coupon Stack Percent Fixed Order Gap when you need a transparent promotional price or eligibility term.
How to use the tool and how it works
- Enter price, fixedDiscount, percentDiscount. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read fixedThenPercent, percentThenFixed, gap. Use the output convention below.
Compute fixed-then-percent and percent-then-fixed final prices, requiring fixedDiscount no greater than price. Return fixedDiscount × percentDiscount as their gap.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| price | Price | Required. Finite number. |
| fixedDiscount | Fixed Discount | Required. Finite number; minimum 0. |
| percentDiscount | Percent Discount | Required. Finite number; minimum 0; maximum 1. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| fixedThenPercent | Fixed Then Percent | Required. Finite number. |
| percentThenFixed | Percent Then Fixed | Required. Finite number. |
| gap | Fixed-then-percent price minus percent-then-fixed price. | Required. Finite number. |
{
"input": {
"price": 100,
"fixedDiscount": 20,
"percentDiscount": 0.1
},
"output": {
"fixedThenPercent": 72,
"percentThenFixed": 70,
"gap": 2
}
} Limitations and assumptions
- The second order can still produce a negative result; percentDiscount is a fraction in [0, 1] and no zero floor or checkout policy is imposed.
- 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
- Offer Stack Order Difference
Compute (price - fixedDiscount) × (1 - fractionDiscount) and price × (1 - fractionDiscount) - fixedDiscount.
- Offer Discount Stack Factor
Multiply all factors (1 - discountFraction) for remainingFactor and multiply basePrice by that product for finalPrice.