Skip to content

Main content

Offer Discount Stack Factor Tool

Apply successive multiplicative caller-supplied discounts, without adding percentage rates.

Loading tool…

Description

Multiply all factors (1 - discountFraction) for remainingFactor and multiply basePrice by that product for finalPrice.

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.

Multiply all factors (1 - discountFraction) for remainingFactor and multiply basePrice by that product for finalPrice.

When to use this tool

Use Offer Discount Stack Factor when you need a transparent promotional price or eligibility term.

How to use the tool and how it works

  1. Enter discountFractions, basePrice. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read remainingFactor, finalPrice. Use the output convention below.

Multiply all factors (1 - discountFraction) for remainingFactor and multiply basePrice by that product for finalPrice.1

Input fieldMeaning and unitsAccepted input
discountFractionsDiscount FractionsRequired. Array of finite number; maximum items 256.
basePriceBase PriceRequired. Finite number; minimum 0.
Output fieldInterpretationReturned shape
remainingFactorRemaining FactorRequired. Finite number.
finalPriceFinal PriceRequired. Finite number.
json
{
  "input": {
    "discountFractions": [
      0.2,
      0.25
    ],
    "basePrice": 100
  },
  "output": {
    "remainingFactor": 0.6000000000000001,
    "finalPrice": 60.00000000000001
  }
}

Limitations and assumptions

  • An empty discount list leaves price unchanged; these are sequential percentage discounts, not an additive percentage or a complete checkout policy.
  • 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

  1. Calculation and input contract: marketing/offer-discount-stack-factor — tool.io

Similar or alternative tools