big.js is a compact JavaScript library for arbitrary-precision decimal arithmetic. It avoids many floating-point accuracy problems that occur with JavaScript’s native Number type. Values are stored using a decimal coefficient, exponent, and sign rather than ordinary binary floating-point representation. Its API supports arithmetic, comparisons, powers, square roots, rounding, and common numeric formatting methods. Precision and rounding behavior can be configured for operations such as division. The library has no runtime dependencies and is only about 6 KB when minified. It supports browsers, Node.js, ES modules, CommonJS, and other JavaScript environments while keeping the API deliberately smaller than bignumber.js or decimal.js.

Features

  • Arbitrary-precision decimal arithmetic
  • Addition, subtraction, multiplication, and division
  • Square roots and integer powers
  • Configurable decimal places and rounding
  • CommonJS and ES module support
  • Dependency-free 6 KB minified library

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow big.js

big.js Web Site

Other Useful Business Software
Cut Data Warehouse Costs by 54% Icon
Cut Data Warehouse Costs by 54%

Easily migrate from Snowflake, Redshift, or Databricks with free tools.

BigQuery delivers 54% lower TCO with exabyte scale and flexible pricing. Free migration tools handle the SQL translation automatically.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of big.js!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Libraries

Registered

15 hours ago