# dinerojs/dinero.js

Create, calculate, and format money in JavaScript and TypeScript

Repository: https://github.com/dinerojs/dinero.js
Canonical: https://ross.abutalabs.com/products/dinerojs
Homepage: https://dinerojs.com
Language: TypeScript
License: MIT
License Family: permissive
Topics: money, monetary, amount, immutable, currency, javascript, typescript
Last push: 2026-08-26T16:57:56+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 74, longevity 100
- inputs: {"age_days": 3098, "days_push": 7, "days_rel": 173, "gap_med": 4, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6789, forks 204 (observed 2026-08-28T04:09:48.622471+00:00)

## What it is
Dinero.js is a JavaScript and TypeScript library for creating, calculating, converting, comparing, and formatting monetary values safely. It uses immutable objects and integer minor units to avoid floating-point precision issues, with built-in ISO 4217 currency support.

## Use cases
- handle money in javascript without floating point errors
- add and subtract currency amounts safely
- format prices for display in a web app
- convert between currencies in typescript
- store monetary values as integers in minor units
- compare monetary amounts in an e-commerce checkout
- support non-decimal currencies with multiple subdivisions

## When to choose
- you need precise, immutable monetary arithmetic in JavaScript or TypeScript
- you want tree-shakeable, framework-agnostic money handling with strong type safety
- you need to support many ISO 4217 currencies including non-decimal ones

## When to avoid
- you need a full accounting or invoicing system rather than a value library
- your project is not JavaScript/TypeScript based
- you need built-in exchange-rate fetching or payment processing

## Facets
- artifact type: library
- maturity: stable
- function: serialization, math, developer-tools
- domain: fintech, web-development, frontend, backend, cross-platform
- platform: browser, cross-platform
- tags: money, currency, immutable, typescript, monetary-values, iso-4217, tree-shakeable, bigint, decimal-arithmetic, nodejs, web-server, javascript

## Member repositories
- dinerojs/dinero.js (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:48.622471+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:42:20.267158+00:00, confidence not recorded.
  - readme: https://github.com/dinerojs/dinero.js (fetched 2026-08-28T04:09:48.622471+00:00, sha 2de4cbd6c3aa)
  - homepage: https://dinerojs.com (fetched 2026-08-29T08:38:36.444680+00:00, sha c5e8f6e7f80b)
  - site_page: https://www.dinerojs.com/getting-started/quick-start (fetched 2026-08-29T08:38:36.453976+00:00, sha 647dc7f9da36)
  - registry_npm: https://registry.npmjs.org/dinero.js (fetched 2026-08-29T08:38:36.457736+00:00, sha eab135429326)
- Data as of 2026-08-30T08:39:29.467469+00:00.
