Public proof
Public calculation tests
Selected reference cases make calculator behavior inspectable. Each case is machine-verified during the release test suite and shows the model, inputs, expected result, and tolerance.
Reference cases
| Tool | Model | Inputs | Expected | Tolerance |
|---|---|---|---|---|
| percentage-calc | X percent of Y = (X / 100) × Y | {"mode":"of","val1":15,"val2":200} | {"result":30} | ±0.000001 |
| percentage-calc | Percent change = ((new - old) / old) × 100 | {"mode":"change","val1":100,"val2":125} | {"percent_change":25} | ±0.000001 percentage points |
| debt-payoff | Single balance, monthly interest, fixed payment plus extra | {"balance":1000,"apr":12,"payment":100,"extra":50} | {"payoff_months":7,"base_payoff_months":11,"interest_saved_positive":true} | Exact months; currency ±$0.01 |
| debt-payoff | Single balance at zero APR with fixed payment | {"balance":1200,"apr":0,"payment":100,"extra":0} | {"payoff_months":12,"total_interest":0} | Exact months; currency ±$0.01 |
| bmi-calc | BMI = kilograms / meters² | {"weight":170,"heightFt":5,"heightIn":9} | {"bmi":25.1,"category":"Overweight"} | ±0.1 BMI unit |
| bmi-calc | BMI = kilograms / meters² | {"weight":120,"heightFt":5,"heightIn":4} | {"bmi":20.6,"category":"Normal"} | ±0.1 BMI unit |
| electricity-cost-calculator | kWh = watts / 1000 × hours × days; cost = kWh × tariff | {"watts":1000,"hours":2,"days":30,"rate":0.15} | {"monthly_kwh":60,"monthly_cost":9} | Energy ±0.01 kWh; currency ±$0.01 |
| electricity-cost-calculator | kWh = watts / 1000 × hours × days; cost = kWh × tariff | {"watts":60,"hours":5,"days":30,"rate":0.25} | {"monthly_kwh":9,"monthly_cost":2.25} | Energy ±0.01 kWh; currency ±$0.01 |