currency.js
Keep, but not for new work. 6th of 8 numbers and money.
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
Overall4.4
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 4.0, likely 3.0 to 5.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.
- npm latestPublishedAt: No release since 2021
- peers Dinero.js: 207 commits last year and faster growth
- robinwieruch.de/javascript-rounding-errors: Rounding limitation led a user to switch to big.js
- github.com/scurker/currency.js/issues: Rounding bugs still open
GPT-6.2 Sol: 4.7, likely 3.6 to 5.9
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.
- currency.js.org: Small API combines basic fixed-precision arithmetic and formatting
- github.com/scurker/currency.js/issues/425: Open arithmetic issue affects a documented input mode
- npm latestPublishedAt and versionsLastYear: Stable package dates to May 2021 with no versions in the last year
- github.com/dinerojs/dinero.js/blob/main/CHANGELOG.md: Stable Dinero.js v2 offers typed currency codes and a BigInt calculator
- robinwieruch.de/javascript-rounding-errors: Practical comparison shows why configurable rounding led an invoicing team to big.js
Needed by many4.7
How many developers need a tool for this job?
Claude Opus 5.5: 5.0, likely 4.0 to 6.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.
- category.job: Category covers exact decimals, money and formatting
- honeybadger.io/blog/currency-money-calculations-in-javascript: Positioned for everyday currency calculations in web apps
GPT-6.2 Sol: 4.4, likely 3.2 to 5.7
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.
- currency.js.org: Framework-independent API for fixed-precision money and formatting
- developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat: Built-in locale-aware number and currency formatting
- 2025.stateofjs.com/en-US/other-tools: Provides utility-library context without a currency.js usage measure
Helps a lot5.1
How well does it do the job for those who need it?
Claude Opus 5.5: 4.5, likely 3.5 to 5.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.
- robinwieruch.de/javascript-rounding-errors: Negative rounding broke invoice cancellations; author switched to big.js
- github.com/scurker/currency.js/issues: Open precision and rounding bugs from 2021 to Oct 2026, including #517 and #425
- honeybadger.io/blog/currency-money-calculations-in-javascript: Less verbose than Dinero but no conversion; US default locale
- npm hasTypes: Types included
GPT-6.2 Sol: 5.6, likely 4.5 to 6.8
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.
- currency.js.org: Documents examples, equal splits, formatting, and the safe-integer ceiling
- npm hasTypes: Ships TypeScript declarations
- github.com/scurker/currency.js/discussions/467: User and maintainer explain rounding after each operation
- github.com/scurker/currency.js/issues/425: Open report of incorrect division with fromCents
- github.com/public/ducat/blob/main/docs/explanation/comparison.md: A competing project measured a small bundle and found silent errors in selected edge cases
Holds up over time2.7
Will it still be a good choice in two years?
Claude Opus 5.5: 2.5, likely 1.5 to 4.0
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.
- github commitsLastYear / releasesLastYear: 0 commits and 0 releases in the last year
- npm latestPublishedAt: Last published 2021-05-19
- github openPullRequests: 29 open pull requests waiting
- scorecard Maintained: Maintained check scores 0
GPT-6.2 Sol: 2.8, likely 1.8 to 4.1
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.
- github pushedAt, commitsLastYear, and releasesLastYear: October push timestamp alongside zero counted commits and releases
- github.com/scurker/currency.js/releases: Version 2.0.4 remains the latest release
- github.com/scurker/currency.js/pull/516: September 2026 division fix remains open
- github.com/dinerojs/dinero.js/blob/main/CHANGELOG.md: Dinero.js shipped stable v2 and follow-up fixes in March 2026
Used widely4.1
How many use it, and is that growing?
Claude Opus 5.5: 4.5, likely 3.5 to 5.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.
- npm downloadsLast4Weeks: 3.83M, up from 1.71M a year ago (2.2x, below the 4.1x median)
- dependents: 707 repos and 219 packages; Dinero.js has 408 repos
- github stars: 3.4k stars, the second-lowest among peers
- bluesky / hackerNews: No recent social attention
GPT-6.2 Sol: 3.6, likely 2.5 to 4.9
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.
- npm downloadsLast4Weeks and downloadsSame4WeeksYearAgo: About 3.83 million versus 1.71 million downloads
- medianDownloadsRatio: 2.24 times trails the catalog baseline of 4.1 times
- dependents: 707 indexed repositories and 219 indexed packages
- peers: Dinero.js has similar installs and faster growth, while decimal peers have much larger indexed footprints
- github stars, hackerNews stories, and bluesky posts: 3,374 stars and zero matches in the two discussion feeds
Vouched for3.9
Who stands behind it being good?
Claude Opus 5.5: 3.0, likely 2.0 to 4.5
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.
- npm-compare.com/accounting,currency.js,dinero.js,numeral: Described as the lightweight choice for simple use; Dinero.js preferred for strict financial logic
- robinwieruch.de/javascript-rounding-errors: Independent report of a production rounding problem
- hackerNews stories: No HN stories
GPT-6.2 Sol: 4.8, likely 3.5 to 6.1
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.
- github.com/invoiceninja/web/blob/main/package.json: Invoice Ninja's web app declares currency.js directly
- github.com/BRIXTOL/currency-symbol-placements: Brixtol describes application use and publishes a formatting wrapper
- robinwieruch.de/javascript-rounding-errors: Invoicing developer switched to big.js for half-even rounding
- 2025.stateofjs.com/en-US/other-tools: Survey provides no project-specific satisfaction or retention measure
Safe6.8
How safe is it to depend on?
Claude Opus 5.5: 7.0, likely 6.0 to 8.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.
- npm dependencies: 0 dependencies
- advisories total: No advisories
- scorecard score: 4.3; Security-Policy, Token-Permissions and SAST score 0
- npm license: MIT
GPT-6.2 Sol: 6.6, likely 5.4 to 7.8
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.
- npm dependencies and license: Zero runtime dependencies and MIT license
- advisories: Zero advisories in the collected OSV data
- scorecard: 4.3 overall, with weak token permissions and dependency pinning
- github.com/scurker/currency.js/security/policy: GitHub detects no security policy
- github.com/scurker/currency.js/releases/tag/v2.0.4: Latest release addressed development dependency security issues
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
- npm downloads, 4 weeks
- 3.8M ×2.2 in a year
- GitHub stars
- 3.4k
- Commits, 12 months
- 0
- npm version
- 2.0.4 May 2021
- Versions, 12 months
- 0
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- 4.3 out of 10, Nov 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (scurker/currency.js), npm (currency.js), OSV and the OpenSSF Scorecard.