How the calculations run, why we picked the formulas we did, and how the AI explanations are produced. Updated June 2026.
Every calculator on this site runs locally in your browser. There is no API call, no server roundtrip, and no data sent anywhere when you click "Calculate". The calculator engine is a single JavaScript file (calculator-engine.js) that lives in your browser cache after the first page load. This matters for three reasons: results come back in milliseconds, your inputs never leave your device for ordinary calculations, and the calculator continues to work even if our servers are down.
The exception is "AI Solve", which is a separate button. AI Solve does call our server, which then calls an upstream LLM provider. We discuss that path further down.
For many geometry problems there are multiple correct formulas — but they differ in numerical behavior near edge cases. We pick the more stable variant even when it is longer. Three examples:
All calculations use IEEE 754 double-precision floating point (the standard JavaScript Number type, providing about 15-17 significant decimal digits). Where a result is sensitive to rounding — for example, the inverse trigonometric functions near ±1 — we clamp the input to the valid domain before evaluation. The helper gcAcos(x) evaluates Math.acos(Math.max(-1, Math.min(1, x))) so that a value of 1.0000000001 produced by accumulated floating-point error returns 0° rather than NaN.
Results are shown to 4 decimal places by default, but the underlying calculation retains full double precision. We do not truncate intermediate values during the calculation chain.
Before every release we run an automated test suite of 22 cases drawn from textbook references. Sample entries include:
Each case has a tolerance (typically 0.001) that the implementation must meet. Failures block the release. Administrators can view the live suite at ?gc_calc_self_test=1 on any page.
The "AI Solve" button is a separate code path from the calculator. When you click it, the inputs you typed are sent — along with a system prompt that instructs the model to explain the solution step-by-step in the style of a textbook — to one of the following LLM providers:
The routing is set per-calculator type — each calculator config declares an ai_purpose field (one of general / proof / reasoning / vision) and the AI handler picks the best-fit provider. If the configured provider is unavailable, we fall back to the next provider with the same capability.
The numeric answer above the AI explanation is always the deterministic output of our calculator engine — it is not generated by the LLM. The LLM's job is to explain that number, not to recompute it. If the LLM's text appears to reach a different number, trust the calculator. See our Editorial Policy for our corrections process.
Geometry Calculator covers two-dimensional and three-dimensional Euclidean geometry, plane analytic geometry, and standard trigonometry. We do not currently support:
Some advanced calculators on the site touch the boundary of these areas (for example, parametric curves on the coordinate plane). We mark those as Advanced (P2 priority) in the calculator listing and recommend you cross-validate results against a CAS tool like Mathematica or SymPy for production work.