# MikeMcl/bignumber.js

A JavaScript library for arbitrary-precision decimal and non-decimal arithmetic

Repository: https://github.com/MikeMcl/bignumber.js
Canonical: https://ross.abutalabs.com/products/bignumberjs
Homepage: http://mikemcl.github.io/bignumber.js
Language: JavaScript
License: MIT
License Family: permissive
Topics: bignumber, javascript, arbitrary-precision, decimal-places, bigdecimal
Last push: 2026-07-05T15:14:35+00:00

## Health v2 (maintenance only)
Score: 78/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 91, release rhythm 49, longevity 100
- inputs: {"age_days": 5046, "days_push": 59, "days_rel": 125, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7009, forks 752 (observed 2026-08-28T04:09:53.267157+00:00)

## What it is
A JavaScript library for arbitrary-precision decimal and non-decimal (base 2-36) arithmetic. It provides a full-featured BigNumber API with configurable precision, rounding modes, and formatting, in an 8 KB dependency-free package.

## Use cases
- avoid floating-point errors in JavaScript money calculations
- add and multiply very large integers in JavaScript
- parse and compute decimal numbers with exact precision
- convert numbers between bases 2 to 36
- format numbers with fixed decimal places and rounding
- generate cryptographically-secure random big numbers

## When to avoid
- you only need simple decimal arithmetic and want a smaller library (use big.js)
- you need non-integer powers or significant-digit precision control (use decimal.js)
- you need native BigInt performance for integer-only workloads

## Facets
- artifact type: library
- maturity: stable
- function: math, serialization
- domain: developer-tools, web-development, fintech
- platform: browser, cross-platform
- tags: arbitrary-precision, bigdecimal, decimal-arithmetic, bignumber, floating-point, javascript, nodejs

## Member repositories
- MikeMcl/bignumber.js (main) score 78

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:53.267157+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:40:43.011238+00:00, confidence not recorded.
  - readme: https://github.com/MikeMcl/bignumber.js (fetched 2026-08-28T04:09:53.267157+00:00, sha 6514b177f18c)
  - homepage: http://mikemcl.github.io/bignumber.js (fetched 2026-08-29T08:36:50.156008+00:00, sha ad68bc7229fd)
  - registry_npm: https://registry.npmjs.org/bignumber.js (fetched 2026-08-29T08:36:50.166185+00:00, sha 355d33353d2b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
