CalcSutra

Calculation Methodology

This document defines how CalcSutra selects, implements, documents, and validates the mathematical models behind every calculator on our platform.

1. Formula Selection

We prioritize primary, official, or widely accepted academic sources. For financial tools, we align formulas with public regulations (e.g., standard amortization models or government provident fund rules). For health metrics, we base formulas on guidelines from organizations like the World Health Organization (WHO) and the Centers for Disease Control and Prevention (CDC).

2. Pure Function Architecture

To ensure calculations are robust and easily testable, all computation logic is separated from the user interface. We write calculation logic as **pure JavaScript/TypeScript functions**. These functions accept raw number inputs, return structured numeric outputs, and perform no side-effects or state updates. This guarantees consistent, predictable outcomes.

3. Verification Framework

Before any new calculator or formula is merged, it must undergo verification against manual test runs or established third-party references. We document this process in our internal test files and codebases, verifying that output values match expected thresholds up to a defined precision level.

4. Transparency & Citations

We believe that every calculator result should be auditable. In line with this, every calculator page displays the primary mathematical formula used, a step-by-step worked example using default values, and links to official reference materials so that users can verify the methodology on their own.