# currency.js: 4.4 out of 10

Keep, but not for new work. 6th of 8 in [Numbers and money](https://elestia.ai/opensource/numbers/index.md).

currency.js is a tiny, dependency-free library for money arithmetic and formatting with a simple chained API. It has not had a release since May 2021. Users have open reports of rounding bugs, including wrong results for negative half-cents, and it has only one rounding mode. It is fine to keep where it already works, but for new projects Dinero.js or a decimal library such as big.js or decimal.js is the safer choice.

**Best for:** Small apps that need quick, readable dollar-and-cent arithmetic and display, without strict accounting rules.

## Scores

- **Overall: 4.4** (likely 3.3 to 5.5)
  - Claude Opus 5.5 (4.0): It is easy and tiny, and it is fine for simple display math. It has been unmaintained since 2021 and has known rounding errors, which matter most for money. Dinero.js, which is active and supports allocation and rounding modes, does the money job better. For plain decimals, big.js or decimal.js do better. Keep it where it already runs, but choose a peer for new work.
  - GPT-6.2 Sol (4.7): currency.js is a reasonable fit when the work is limited to simple single-currency totals, equal splits, and display. For most new money-handling projects, Dinero.js offers typed currency codes and a BigInt option, and big.js is a better fit when decimal rounding needs more control. The open division bug and the gap since the last release weigh heavily because a new project may depend on both arithmetic correctness and timely fixes.
- **Needed by many: 4.7** (likely 3.6 to 5.9)
  - Claude Opus 5.5 (5.0): Many web apps handle prices, carts or invoices and need correct money arithmetic and display. currency.js covers only the money part of the category, not general decimals or number formatting, so its audience is narrower than that of decimal.js or the number formatters.
  - GPT-6.2 Sol (4.4): Fixed-precision money arithmetic is useful in checkout, invoicing, and billing across JavaScript runtimes. Built-in Intl.NumberFormat covers many display-only uses, and currency.js concentrates on simple monetary amounts. The share of developers who need that combination is an estimate.
- **Helps a lot: 5.1** (likely 4.0 to 6.2)
  - Claude Opus 5.5 (4.5): The API is small, readable and typed, and it handles simple money math and formatting well. It supports only round-half-up, which gives wrong results for negative half-cents and caused one author to make retroactive invoice fixes. Bugs in fromCents and multiply/divide have stayed open since 2021. Dinero.js and big.js handle rounding and allocation more correctly.
  - GPT-6.2 Sol (5.6): Version 2.0.4 makes basic totals, equal splits, and formatting straightforward, and its short examples and bundled types make common calls easy to write. Rounding after each step can change tax or discount totals, and a long-open fromCents bug can miscalculate division. The trade-off depends on how much the application needs chained arithmetic, configurable rounding, and currency checks.
- **Holds up over time: 2.7** (likely 1.7 to 4.1)
  - Claude Opus 5.5 (2.5): There have been no commits or releases in the last year, and the last publish was in May 2021. The project has one maintainer and no visible funding. It has 29 open pull requests, and bug reports are not being answered. It is not archived, and its small scope means it will keep working, but fixes are unlikely.
  - GPT-6.2 Sol (2.8): The last stable release was in May 2021, and the collector recorded zero commits and releases in the last year despite an October push timestamp. The division bug was reported in 2022 and still has an open fix from September 2026, while Dinero.js shipped a stable major release in 2026. The small, dependency-free API may continue to work for basic use, but the timing of future fixes is unclear.
- **Used widely: 4.1** (likely 3.0 to 5.2)
  - Claude Opus 5.5 (4.5): It has about 3.8M downloads per 4 weeks and 707 dependent repositories, which is similar to Dinero.js and far below the decimal libraries. Downloads grew 2.2x in a year, below the 4.1x median, so it is losing share. Dinero.js grew 3.7x.
  - GPT-6.2 Sol (3.6): Four-week npm downloads rose to 3.83 million, or 2.24 times the year-earlier count, below the catalog median of 4.1 times and Dinero.js at 3.71 times. The index found 707 repositories and 219 packages, with repository coverage ahead of Dinero.js and well behind the general decimal libraries. That shows a real user base, but automated installs and incomplete indexing make the number of direct choices uncertain.
- **Vouched for: 3.9** (likely 2.8 to 5.3)
  - Claude Opus 5.5 (3.0): Comparison sites and blog posts mention it as the lightweight option, but I found no well-known production users and no survey data. One independent write-up reports a correctness failure in real invoicing. No framework builds on it.
  - GPT-6.2 Sol (4.8): Invoice Ninja lists currency.js as a direct web dependency, and Brixtol reports using it in its applications. An independent invoicing write-up describes switching to big.js after running into rounding problems with cancellations. Public endorsements and survey data give little visibility into how often teams keep using it.
- **Safe: 6.8** (likely 5.7 to 7.9)
  - Claude Opus 5.5 (7.0): It has no dependencies, no known advisories and an MIT licence, so the attack surface is small. The OpenSSF Scorecard is 4.3, with no security policy and broad token permissions. One maintainer controls publishing, and unfixed correctness bugs are a risk for money code.
  - GPT-6.2 Sol (6.6): The package has zero runtime dependencies, a permissive MIT license, and zero advisories in the OSV snapshot. The last release addressed development dependency security issues, but the 4.3 OpenSSF Scorecard flags weak token permissions and dependency pinning, and GitHub shows no security policy. The small dependency surface helps, while the long release gap makes the response to a future report hard to predict.

## Good

- About 1 KB, with no dependencies and with TypeScript types included.
- Simple chained API (currency(1.23).add(0.1).format()) that is easy to learn and for AI agents to write.
- Works internally with integers, which avoids the common float errors in everyday add, subtract and multiply.
- Formatting is built in, with options for the symbol, separator, decimal mark and pattern.

## Bad

- Its only rounding mode is round-half-up, and negative half-cents round the wrong way (currency(-2.675) gives -2.67).
- There has been no release since v2.0.4 in May 2021, and bug reports about fromCents and multiply results have stayed open for years.
- It has no allocation, no BigInt support and no currency conversion, and its integer storage limits precision for very large values.
- Defaults to US formatting, so other locales and currencies need manual setup.

## The numbers

- Downloads, 4 weeks: 3.8M
- In a year: ×2.2
- GitHub stars: 3.4k
- Commits, 12 months: 0
- Last npm release: May 2021
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/scurker/currency.js
- npm: https://www.npmjs.com/package/currency.js

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
