Light, ultra-fast javascript implementation for BigIntegers (base arithmetic operations)

BigNumber.js is a light javascript library for node.js and the browser, dealing with operations on big integers.

It does one thing, implementing only the main arithmetic operations for big integers, but it does it very well and very fast.

It is build with performance in mind and supports all basic arithmetic operations (+, -, *, /, %, ^, abs). Works with both positive and negative integers.

You can do a live test here: (


  • in node:
    var BigNumber = require('big-number').n;
    // 760056543044267246001 
  • in the browser:
    <script src ="bignumber.js"></script>
    // 760056543044267246001 

Supported methods: add/plus, minus/subtract, multiply/mult, divide/div, power/pow, mod, equals, lt, lte, gt, gte, isZero, abs

    BigNumber(2).plus(10); // or 
    BigNumber(2).minus(10); // or 
    BigNumber(2).multiply(10); // or 
    BigNumber(2).divide(10); // or 
    BigNumber(2).power(10); // or