# MikeMcl/big.js

A small, fast JavaScript library for arbitrary-precision decimal arithmetic.

Repository: https://github.com/MikeMcl/big.js
Canonical: https://ross.abutalabs.com/products/bigjs
Homepage: http://mikemcl.github.io/big.js
Language: JavaScript
License: MIT
License Family: permissive
Topics: bignumber, bigdecimal, javascript, arbitrary-precision, decimal-places
Last push: 2025-04-22T19:47:27+00:00

## Health v2 (maintenance only)
Score: 40/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 17, release rhythm 35, longevity 100
- inputs: {"age_days": 5047, "days_push": 498, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5194, forks 413 (observed 2026-08-28T04:09:12.023174+00:00)

## What it is
big.js is a small, fast JavaScript library for arbitrary-precision decimal arithmetic, exporting a single immutable Big number constructor with a simple chained API. It works in all browsers and Node/Deno environments with no dependencies.

## Use cases
- avoid floating-point errors like 0.3 - 0.1 in JavaScript
- do precise decimal arithmetic for money and prices
- handle numbers with more than 15 significant digits
- round and format decimals with controlled decimal places
- parse and compute with numbers in exponential notation

## When to choose
- you need a tiny (~6 KB), dependency-free decimal math library
- you only need basic arithmetic, rounding, and comparison on decimals
- you want broad browser compatibility including legacy environments
- you prefer a simple API over heavyweight BigDecimal ports

## When to avoid
- you need non-decimal bases, NaN/Infinity, or advanced math functions like trigonometry
- you need binary floating-point semantics rather than decimal
- you need very large exponent ranges beyond the recommended magnitude of 1,000,000
- you need integer-only arbitrary precision, where BigInt may suffice

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

## Member repositories
- MikeMcl/big.js (main) score 40

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:12.023174+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-29T18:01:43.787241+00:00, confidence not recorded.
  - readme: https://github.com/MikeMcl/big.js (fetched 2026-08-28T04:09:12.023174+00:00, sha df754ebd404a)
  - homepage: http://mikemcl.github.io/big.js (fetched 2026-08-29T08:55:39.147701+00:00, sha 91b9aaf95ff9)
  - registry_npm: https://registry.npmjs.org/big.js (fetched 2026-08-29T08:55:39.151865+00:00, sha 7d80a8e245b6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
