decimal.js
An arbitrary-precision Decimal type for JavaScript with trigonometric and exponential methods.
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.
Learn decimal.js by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide2 sections
Overview of decimal.js
decimal.js handles high-precision accounting calculations and loan amortization tables.
Quickstart
npm install decimal.jsimport Decimal from 'decimal.js';const total = new Decimal('19.99').times('3').plus('1.50');console.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.
activecampaign-api-php
Official ActiveCampaign PHP API client for marketing automation and deal pipelines.
klaviyo-api-python
Official Python SDK for the Klaviyo E-commerce Marketing Automation API.
klaviyo-api-node
Official Node.js SDK for the Klaviyo E-commerce Marketing Automation API.
hubspot-api-python
Official Python client for the HubSpot CRM & Marketing Automation REST APIs.