NUMERICAL AUDIT · 24 OCTOBER 2026

Formula.js: seven proposed fixes for blanks, financial formulas and dates

Reproduced blank-cell, solver-convergence and calendar discrepancies, with independent PRs and tests.

Xamit Kadirbekov, Daniyal Kadirbekov · AI-assisted investigation and writing

Open upstream PRs; not merged or released. Local regression checks and limitations documented.

Upstream report #258 · Upstream report #259 · Upstream report #260 · Upstream report #261 · Upstream report #262 · Upstream report #263 · Upstream report #264 · Reproduction archive · Zenodo archive (DOI) · Github Catalog · Huggingface · Linkedin

Authors: Xamit Kadirbekov and Daniyal Kadirbekov (GERO). 24 October 2026.

Status: Open upstream PRs; not merged or released. Local regression checks and limitations documented.

Reproduced blank-cell, solver-convergence and calendar discrepancies, with independent PRs and tests.

Published proposals

What changes, and why it matters

An empty cell is not always a numeric zero. For example, a referenced blank between 2, 6 and 8 changes a median from 6 to 4 if coerced to zero. The proposed blank-cell change ignores blank/null/undefined elements for relevant numeric and paired-series calculations while preserving explicit numeric zero and propagated errors. A missing value can otherwise alter a statistic or forecast silently. This does not claim that every spreadsheet engine treats every blank argument identically.

RATE can return a finite candidate that does not solve the cash-flow equation. In the supplied weekly-payment example, a bad default iteration implies roughly 164.84% nominal annual rate, versus the generating rate of 6.5%. The patch checks convergence and rejects invalid results with #NUM; it does not guarantee convergence from every starting guess. A suitable guess recovers the original weekly rate. Nominal annualization here means weekly rate multiplied by 52, not an effective annual return or a regulatory APR.

The remaining separate proposals concern DATEDIF month-end boundaries, WEEKNUM year-boundary handling, YEARFRAC calendar-day/DST and basis handling, NETWORKDAYS holiday/weekend behavior, and DISC/PRICEDISC day-count consistency. Each PR has a small regression and its own branch. These are seven change families, not a count of independent mathematical discoveries.

Validation

The base is formulajs/formulajs master 42dbeb18b15f271b6e90d927cc972f0f06565dcf. Every new regression fails on the base. Each separate patched branch passes its complete existing Mocha test suite in both UTC and America/New_York: 571–573 tests pass, with three pre-existing pending tests. Changed-file Prettier checks pass. The repository's full lint/build pipeline was not run.

The evidence archive contains exact diffs, separate regression files, upstream licenses and validation metadata. To reproduce, check out the base, install the repository's declared dependencies, apply the relevant patch, and run its Mocha suite under each stated TZ. Do not apply unrelated PR patches when validating one proposal.

Reference checks used Microsoft's function documentation and LibreOffice's published day-count implementation. We did not run Microsoft Excel. The proposed US/NASD February changes and a separate DAYS360 allegation were excluded because the compatibility convention was not sufficiently established.

Sources and boundaries

No customer financial records were used, and no real monetary loss was measured. The archive's validation is scoped to these branches and dependency versions. Maintainer acceptance and release inclusion remain pending.

Attribution and license

Investigation, proposed patches, tests and report preparation used Codex/ChatGPT assistance. Xamit Kadirbekov and Daniyal Kadirbekov are the report authors; upstream software remains credited to its developers. Report: CC BY 4.0. Original reproduction code: MIT; upstream patches retain their upstream licenses.