TiloBox
Back to directory
decimal.js project preview

decimal.js

An arbitrary-precision Decimal type for JavaScript with trigonometric and exponential methods.

LicenseMIT
GitHub stars5.8k
Last commit6 days ago
Tags5 topics
BusinessDecimal Arithmetic JsBank Interest CalculatorDecimal Js SuiteMonetary Precision Lib
Overview

Why consider decimal.js?

decimal.js is an open-source, high-precision decimal arithmetic library written by Michael Mclaughlin. It provides robust configurable precision decimal math, supporting precise banking interest calculations, amortization schedules, and multi-currency billing reconciliation.

Guided learning

Learn decimal.js by building

Practical setup notes, real use cases, and copy-ready examples in one focused guide.

1 min read 2 sections
In this guide2 sections

Overview of decimal.js

decimal.js handles high-precision accounting calculations and loan amortization tables.

Quickstart

bash
1npm install decimal.js
javascript
1import Decimal from 'decimal.js';
2const total = new Decimal('19.99').times('3').plus('1.50');
3console.log(total.toFixed(2)); // '61.47'

decimal.js is licensed under the permissive MIT License.

Related tools

More options with a similar category or technology profile.

decimal.js FAQs

decimal.js is listed as a Business tool on TiloBox. Review the overview, features, and official documentation on this page to decide whether it solves your specific workflow.

Start with the project's GitHub repository and official website for supported installation and deployment instructions. Test the setup with representative data or a small project before rolling it out more widely.

decimal.js is listed under the MIT license. Read the complete license text and the project's notices before using, modifying, or distributing the software.

Production readiness depends on your requirements. Review maintenance activity, security practices, documentation, backup and upgrade procedures, and compatibility with your stack; then validate it in a non-production environment.

decimal.js is listed as an alternative to BigNumber.js. Compare the core workflow, deployment model, integrations, and licensing against your must-have requirements before switching.