# josdejong/mathjs

An extensive math library for JavaScript and Node.js

Repository: https://github.com/josdejong/mathjs
Canonical: https://ross.abutalabs.com/products/mathjs
Homepage: https://mathjs.org
Language: JavaScript
License: Apache-2.0
License Family: permissive
Topics: math, javascript, complex-numbers, matrices, units, bignumbers, expression-evaluator
Last push: 2026-08-10T10:45:31+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 35, longevity 100
- inputs: {"age_days": 4947, "days_push": 23, "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 15070, forks 1316 (observed 2026-08-28T04:11:09.117259+00:00)

## What it is
Math.js is an extensive math library for JavaScript and Node.js that provides a flexible expression parser with symbolic computation, hundreds of built-in functions and constants, and integrated support for numbers, big numbers, bigints, complex numbers, fractions, units, and matrices. It runs in any JavaScript engine (browser, Node.js, CLI) and is easily extensible and configurable.

## Use cases
- evaluate math expressions from strings in javascript
- work with complex numbers, fractions, and matrices in js
- convert units like cm to inch in javascript
- compute symbolic derivatives in the browser
- do arbitrary precision arithmetic in node.js
- parse and evaluate user-entered formulas safely
- calculate determinants and matrix operations in a web app

## When to choose
- you need to parse and evaluate mathematical expressions from user input or strings
- you need data types JavaScript's built-in Math lacks, such as complex numbers, fractions, units, or big numbers
- you want one consistent math API that works in both the browser and Node.js
- you need light symbolic computation like derivatives or simplification in JavaScript

## When to avoid
- you only need basic arithmetic, where the native Math object is lighter and faster
- you need high-performance numerical or heavy linear-algebra computing, where a compiled or GPU-backed tool is better
- bundle size is critical and you cannot leverage tree-shaking or the number-only build

## Facets
- artifact type: library
- maturity: stable
- function: math, parser
- domain: mathematics, web-development, developer-tools
- platform: browser, bun, cli
- tags: expression-parser, symbolic-computation, complex-numbers, matrices, units, bignumbers, fractions, numerical-computing, calculator, arbitrary-precision, nodejs, deno

## Member repositories
- josdejong/mathjs (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:09.117259+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:06:45.223854+00:00, confidence not recorded.
  - readme: https://github.com/josdejong/mathjs (fetched 2026-08-28T04:11:09.117259+00:00, sha d11061ada29a)
  - homepage: https://mathjs.org (fetched 2026-08-29T08:04:59.535282+00:00, sha a8bf7f03ce3a)
  - site_page: https://mathjs.org/docs/getting_started.html (fetched 2026-08-29T08:04:59.537865+00:00, sha 2d5a43aba136)
  - site_page: https://mathjs.org/docs/index.html (fetched 2026-08-29T08:04:59.539690+00:00, sha 2984c73eebc7)
- Data as of 2026-08-30T08:39:29.467469+00:00.
