Back to calculator
Everyday LifeGenerated accuracy model review: 2026-05-06

Discount Calculator accuracy and testing

This page documents how Calwarden builds trust for this calculator: source notes, regression-style default tests, limitations, assumptions, unit handling, rounding, and visible change history.

Formula source

  • 1. **Discount Amount** = Original Price × (Discount% / 100) 2. **Price After Discount** = Original Price - Discount Amount 3. **Tax Amount** = Price After Discount × (Tax% / 100) 4. **Final Price** = Price After Discount + Tax Amount

Test cases

Default input regression check

Generated from the checked-in default inputs and calculate function.

Inputs

  • Original Price: $100
  • Discount: 20%
  • Sales Tax: 0%

Expected outputs

  • Final Price: $80.00
  • You Save: $20.00

Known limitations

  • This page documents the checked-in calculator logic and does not certify results for every real-world edge case.
  • Use the result as a planning estimate unless the calculator page states a stricter purpose.

Assumptions

  • The discount is applied to the original listed price.
  • Sales tax is calculated on the discounted price, not the original price.
  • This does not model stacked coupons or store-specific promotion rules.

Unit handling

  • Original Price accepts values in $.
  • Discount accepts values in %.
  • Sales Tax accepts values in %.
  • Final Price is displayed as currency.
  • You Save is displayed as currency.

Rounding rules

  • Number displays use up to 2 decimal places in the calculator UI.
  • Currency outputs are displayed with standard US dollar formatting.

Version history

1.0.0 - 2026-05-06

Generated accuracy and testing page from the current discount-calculator calculator definition.

Change log

2026-05-06

Published default regression test documentation and metadata fallbacks for Discount Calculator.

Calculator transparency

Accuracy pages are generated from checked-in calculator definitions and can be upgraded with curated review metadata over time.

Use calculator