A pricing calculator your users can check
Tiered per-seat pricing with an annual discount — the calculation every B2B product puts on a page, usually reimplemented in JavaScript and then quietly disagreeing with what billing charges.
- Tier the seat count lands in
- 10
- Monthly
- 480
- Annual, discounted
- 4,896
B7
B8
B9
Verified at build timeThese figures are produced by running the grid above through the engine during the build. If the engine ever disagrees with them, this page does not ship.
One engine, so the number on your pricing page and the number your backend bills are the same number — not two implementations that agree until a rounding edge case.
The same thing, in code
Nothing here is playground-only.
The grid above and the snippet below run the same engine. Whatever you can do in the sheet, you can do from your own program.
import { evaluate } from '@truecalc/core';
// The same rule the grid runs, from your own code.
evaluate('IF(B6<10,12,IF(B6<100,10,8))', { B6: 48 });
// => { type: 'number', value: 10 }
evaluate('ROUND(B8*12*0.85,2)', { B8: 480 });
// => { type: 'number', value: 4896 }Take it further
The engine is MIT and on npm today. The React component is not published yet — it is pre-1.0 and we would rather talk to you than hand you an unstable API.