bignumber.js
A strong pick. 2nd of 8 numbers and money.
bignumber.js is a mature, zero-dependency library for exact decimal arithmetic, with its precision set in decimal places. It also does base conversion and formatting. It is a solid, actively maintained pick for exact math today, but v10 and v11 in early 2026 changed how it handles invalid input, so plan for that when you upgrade older code.
Best for: Projects that need exact decimal math with fixed decimal places, built-in number formatting or non-decimal bases, and do not need a full money model.
Scores
Overall7.3
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It is a strong, actively maintained choice for exact decimal math, especially when you want decimal-place precision and formatting in one zero-dependency package. decimal.js has more users and more math functions, big.js is smaller for simple needs, and Dinero.js is better when you need a real money model. The 2026 breaking changes and the single maintainer keep it out of the top tier.
- peers decimal.js: decimal.js has more downloads and more than twice the dependent repos
- github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md: Active 2026 development with breaking majors
- honeybadger.io/blog/currency-money-calculations-in-javascript: Money write-ups often point to Dinero.js or big.js instead
- npm downloadsSame4WeeksYearAgo: Growth equal to the median
GPT-6.2 Sol: 7.5, likely 6.4 to 8.5
Pick bignumber.js when exact decimal totals, explicit rounding, and custom number formatting belong in one small library. Dinero.js is a better fit for modelling currencies and allocating amounts, and decimal.js covers more scientific math. The unreleased rounding fix and reliance on one publisher keep bignumber.js from being the default across the category.
- mikemcl.github.io/bignumber.js: Exact core arithmetic and flexible parsing, rounding, and formatting.
- dinerojs.com: Models money with currency information and supports monetary allocation.
- mikemcl.github.io/decimal.js: Broader scientific math API.
- github.com/MikeMcl/bignumber.js/pull/414: Correctness fix landed after the current npm release.
- socket.dev/npm/package/bignumber.js/versions: One listed npm maintainer publishes releases.
Needed by many4.8
How many developers need a tool for this job?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
Exact decimal math matters in finance, e-commerce, crypto and data work, but many web apps never need more than native numbers or Intl.NumberFormat. bignumber.js is general-purpose and runs in any runtime. That puts it at the middle of the scale.
- npm-compare.com/big.js,bignumber.js,decimal.js,mathjs: Positioned for general web apps and financial frontends
- Intl.NumberFormat / native Number: Many apps cover formatting without a library
GPT-6.2 Sol: 4.5, likely 3.4 to 5.7
Exact arithmetic matters for billing, financial data, and other precision-sensitive work, and the library works in browsers and on servers. Built-in Intl.NumberFormat covers many display-only needs. The share of projects that also need arbitrary precision is hard to measure.
- github.com/tc39/proposal-decimal: Identifies money and other exact decimal quantities as use cases.
- tc39.es/ecma402/#sec-intl.numberformat.prototype.format: Defines native locale-aware number formatting.
- app.unpkg.com/bignumber.js@11.1.5/files/package.json: Ships browser, CommonJS, and ES module entry points.
Helps a lot7.6
How well does it do the job for those who need it?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
It is a precise, well-tested library with complete API docs, bundled types and rich formatting. The 2026 releases added strict input checks, toBigInt, fromFormat and better formatting. It has no money abstraction and no log or trig functions. A few small open bugs remain, such as toFraction hanging under ROUND_FLOOR and toString(base) under-rounding for odd bases.
- github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md: v10/v11 added STRICT mode, toBigInt, fromFormat and ESM/CJS builds
- dev.to/fvictorio/a-comparison-of-bignumber-libraries-in-javascript-2gc5: Independent review: decimal-place precision suits finance, supports bases
- github.com/MikeMcl/bignumber.js/issues: Only 7 open issues, all minor edge cases
- npm hasTypes: Bundled TypeScript types
GPT-6.2 Sol: 7.7, likely 6.5 to 8.7
Version 11.1.5 combines exact basic arithmetic with configurable division, custom formatting, and a documented, typed API. The published build still has the zero-rounding bug, and decimal.js covers more scientific functions. The available comparison uses older versions, so current relative speed and coding-agent accuracy are uncertain.
- mikemcl.github.io/bignumber.js: Documents arithmetic, rounding, formatting, and error behavior.
- npm.hasTypes: TypeScript declarations ship with the package.
- app.unpkg.com/bignumber.js@11.1.5/files/dist/bignumber.mjs: The published ES module contains the old rounding logic.
- github.com/MikeMcl/bignumber.js/pull/414: Contributor report and regression tests show when zero rounds incorrectly.
- mikemcl.github.io/decimal.js: The peer adds logarithms, trigonometry, and significant-digit arithmetic.
- measurethat.net/Benchmarks/Show/27717/0/bignumberjs-vs-bigjs-vs-decimaljs-i-vs-currencyjs: big.js led a small browser workload against an older bignumber.js build.
Holds up over time6.6
Will it still be a good choice in two years?
Claude Opus 5.5: 6.5, likely 5.0 to 7.5
It was very active in 2026, with two majors, many patch releases and 29 commits, and issues are handled quickly. The risks are one maintainer with no visible funding and two breaking majors close together. The project is 14 years old and other libraries depend on it widely, so it is unlikely to vanish.
- github commitsLastYear: 29 commits; 10 npm versions in the last year
- github openIssues / closedIssues: 7 open vs 296 closed
- github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md: v10.0.0 (Feb 2026) and v11.0.0 (Apr 2026) changed input handling
- scorecard Code-Review: Score 1: almost no second-person review, which suggests one maintainer
GPT-6.2 Sol: 6.6, likely 5.3 to 7.9
The project made 29 commits and published 10 npm versions over the past year, ahead of big.js and decimal.js on recent release activity. The August rounding fix is still awaiting an npm release, and Taquito needed compatibility changes when it upgraded to v10. One listed npm maintainer and limited public information about funding or backup publishers widen the range.
- github.commitsLastYear, github.pushedAt, npm.versionsLastYear, npm.latestPublishedAt, peers: Active release stretch through July, with the latest repository push in August.
- github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md: Records two major releases plus formatting and fraction fixes.
- github.com/MikeMcl/bignumber.js/pull/414: Rounding fix merged on August 31, after the July npm release.
- github.com/ecadlabs/taquito/pull/3383: Downstream upgrade required input-handling and TypeScript changes.
- socket.dev/npm/package/bignumber.js/versions: One listed npm maintainer published the recent versions.
Used widely6.8
How many use it, and is that growing?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It has 360M downloads in 4 weeks, up 4.1x from a year ago. That matches the 4.1 median, so it is holding ground, not gaining. Much of the volume is transitive, through packages such as json-bigint and database drivers. Its 437k dependent repos are fewer than decimal.js (958k) and big.js (1.27M), but still show hundreds of thousands of projects.
- npm downloadsLast4Weeks: 360M, vs 88M a year ago (ratio about 4.1)
- medianDownloadsRatio: 4.1 median: flat relative share
- dependents repos: 436,905 repos and 7,230 packages, below decimal.js and big.js
- github stars: 7,012 stars, similar to decimal.js
GPT-6.2 Sol: 6.6, likely 5.4 to 7.6
ecosyste.ms found about 437,000 dependent repositories and 7,230 packages, with both decimal.js and big.js ahead on repository count. Downloads grew 4.095× year over year, just below the 4.1× catalog baseline and behind decimal.js at 4.41×. Popular dependencies pull in v9, and npm's version breakdown makes it hard to infer how many new projects choose v11.
- dependents, peers: The repository footprint is large but trails both close arithmetic peers.
- npm.downloadsLast4Weeks, npm.downloadsSame4WeeksYearAgo, medianDownloadsRatio, peers: 360.2 million versus 88.0 million downloads, just below baseline growth.
- npmjs.com/package/bignumber.js?activeTab=versions: npm lists roughly 75 million weekly downloads for 9.3.1 and 820,000 for 11.1.5.
- github.com/sidorares/json-bigint/blob/master/package.json: json-bigint automatically installs bignumber.js v9.
- github.stars, hackerNews.stories, bluesky.posts: About 7,000 stars and no matched stories or posts in the collector snapshot.
Vouched for6.5
Who stands behind it being good?
Claude Opus 5.5: 6.0, likely 4.5 to 7.0
Thousands of published packages, including widely used JSON, database and blockchain SDKs, build on it, and independent comparisons recommend it for financial work. It does not appear in developer surveys, and there are no current benchmarks or Hacker News or Bluesky discussion. Most of the validation is indirect and old.
- dependents packages: 7,230 npm packages depend on it
- npm-compare.com/big.js,bignumber.js,decimal.js,mathjs: Called a safe default for general precision work
- dev.to/fvictorio/a-comparison-of-bignumber-libraries-in-javascript-2gc5: Independent comparison; notes web3 0.x used a fork
- hackerNews / bluesky: 0 stories, 0 posts
GPT-6.2 Sol: 7.0, likely 5.8 to 8.1
Google Cloud's Node.js metadata client uses BigNumber for large values, and the Taquito SDK integrated v10 into its shipped packages. These integrations establish real use, while the independent benchmark covers older releases. The State of JS tools survey gives no satisfaction measure for the library, and independent evidence specific to v11 remains limited.
- docs.cloud.google.com/nodejs/docs/reference/gcp-metadata/latest: Google Cloud documents BigNumber as the return type for oversized numeric metadata.
- github.com/ecadlabs/taquito/pull/3383: Taquito integrated bignumber.js v10 in its shipped SDK packages.
- measurethat.net/Benchmarks/Show/27717/0/bignumberjs-vs-bigjs-vs-decimaljs-i-vs-currencyjs: Independent browser benchmark covers an older version and one small workload.
- 2025.stateofjs.com/en-US/other-tools: The survey provides no package-specific usage or satisfaction result.
Safe7.1
How safe is it to depend on?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
It has zero runtime dependencies, an MIT licence and no advisories ever recorded. The OpenSSF Scorecard is weak at 2.9: no branch protection, no security policy, unpinned dependencies, no SAST, and releases by one person without review. Those process gaps lower the score despite the clean record.
- npm dependencies: 0 dependencies
- advisories total: 0 advisories
- scorecard score: 2.9, with Branch-Protection, Security-Policy and SAST at 0
- npm license: MIT
GPT-6.2 Sol: 6.6, likely 5.4 to 7.8
The MIT licence, zero runtime dependencies, and clean OSV record keep dependency risk relatively low. The 2.9 OpenSSF Scorecard flags weak branch protection and review, unpinned workflow dependencies, broad token permissions, and a missing security policy. One listed npm maintainer and limited public evidence about how releases are verified leave uncertainty about publishing safeguards.
- npm.dependencies, npm.license, advisories: Zero runtime dependencies, MIT licence, and no recorded OSV advisories.
- scorecard.score, scorecard.checks: Branch protection, token permissions, pinning, and security policy checks scored zero.
- github.com/MikeMcl/bignumber.js/security: GitHub shows no published security policy.
- socket.dev/npm/package/bignumber.js/versions: The registry history shows one listed maintainer publishing recent releases.
Good
- Zero dependencies, MIT licence, and no published security advisories in about 14 years.
- Precision is set in decimal places, which fits financial rounding, and the library offers 9 rounding modes.
- Built-in toFormat, fromFormat, toFraction, toBigInt and base 2-64 conversion cover formatting and parsing as well as arithmetic.
- Ships separate ESM, CommonJS and browser builds with bundled TypeScript types.
Bad
- Two major versions in 2026 (v10, v11) made invalid input throw by default, which can break code that expected NaN.
- One maintainer does almost all the work, with no visible funding.
- It has no money or currency model; Dinero.js handles currencies, allocation and scale for you.
- It lacks non-integer powers, logarithms and trig functions, which decimal.js has.
The numbers
- npm downloads, 4 weeks
- 360M ×4.1 in a year
- GitHub stars
- 7k
- Commits, 12 months
- 29
- npm version
- 11.1.5 Jul 2026
- Versions, 12 months
- 10
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- 2.9 out of 10, Nov 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (MikeMcl/bignumber.js), npm (bignumber.js), OSV and the OpenSSF Scorecard.