Calculation methodology

1. Define the calculation

Every calculator begins with an explicit formula, input units, validation rules, and assumptions. When multiple industry conventions exist, the page explains which convention is used instead of presenting the result as universal.

2. Separate formulas from presentation

Calculator logic is implemented as pure TypeScript functions. The interface collects inputs and displays results, while the numerical function can be tested independently without a browser or hidden state.

3. Test known results and boundaries

Automated tests cover representative calculations plus relevant boundaries such as zero interest, empty datasets, invalid denominators, non-amortizing payments, overnight time ranges, negative temperatures, and exact unit relationships. The complete calculator test suite is run before a release build.

4. Use exact definitions where possible

Unit converters use published SI relationships and exact international definitions. Financial calculators use standard amortization, annuity, percentage, or return formulas, with rounding delayed until display whenever practical.

5. State what is not included

Financial outcomes depend on lender rules, fees, taxes, timing, markets, and personal circumstances. Each financial page identifies material omissions and directs users to official documents or qualified professionals for transaction-specific decisions.

6. Respond to corrections

Material formula corrections receive new tests to prevent the same error from returning. Content and assumptions are updated when the implemented calculation changes; dates are not refreshed merely to make a page appear newer.