infoz

Methodology

Last updated: 2026-04-27. This page documents how infoz.com calculators are designed, tested, and maintained. The underlying code is open in our public repository and the test cases are checked into version control alongside it.

1. Architecture

Each calculator has three layers, each with a single responsibility:

  1. Pure calculation logic — a TypeScript function in lib/calculators/[name]/. No DOM access, no state, no I/O beyond reading the bundled rules JSON. Runtime input validation via zod.
  2. UI component — a React client component in components/calculators/[name]/. Renders the form, hosts a debounced live update via useMemo, and shows the result panel and breakdown tables.
  3. Page wrapper — a Next.js route in app/(tools)/.../page.tsx. Sets metadata, renders schema.org JSON-LD, and assembles the disclaimer banner, methodology block, sources, FAQ, and disclaimer block.

2. Tax data files

Bracket schedules, contribution limits, and other year-specific rules live in versioned JSON under data/tax-rules/[country-year].json. Each file includes:

3. Currency math

Calculator output is presented to whole dollars / pounds / cents per each country's convention. Internally, we use floating-point arithmetic; we round at the boundary (the final result, plus per-period and per-bracket snapshots). For multi-decade projections, residual floating-point drift over hundreds of iterations is sub-dollar.

4. Testing

Every calculator ships with a test suite in tests/calculators/run by Vitest. Coverage thresholds are configured at 90% for lib/calculators/; the build does not pass below that.

Tests cover at minimum:

5. “Last reviewed” convention

Every calculator and data page surfaces a Last reviewed date prominently. This is the date a human reviewer last verified the underlying figures against the primary source. Note this is distinct from the “data refreshed” date — automated refreshes (when we add them) update the underlying numbers; only human review updates the last-reviewed date.

6. Refresh cadence

The intended cadence:

7. Sources

Every calculator page lists its specific sources in a dedicated Sources block. The site-wide list of all authoritative datasets, with last-checked dates, lives at /sources.

8. Disclaimers

Calculators surface a comprehensive disclaimer block (assumptions, explicit “not covered” list, no-warranty / no-liability language). The full site-wide legal disclaimer is at /disclaimer. Editorial standards are documented at /editorial-policy.

9. Open issues and limitations

We document known scope limits transparently. Examples:

Each calculator page repeats its specific limits in its disclaimer block.