# @ethersproject/bignumber

> BigNumber library used in ethers.js.

Latest version **5.8.0** (published 2025-02-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ethersproject/bignumber
pnpm add @ethersproject/bignumber
yarn add @ethersproject/bignumber
bun add @ethersproject/bignumber
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 5.8.0 |
| Published | 2025-02-26 |
| First published | 2019-03-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 139.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8715 |
| Author | Richard Moore |
| Maintainers | ricmoo |
| Keywords | Ethereum, bignumber, bn |

## Links

- npm: https://www.npmjs.com/package/@ethersproject/bignumber
- Repository: https://github.com/ethers-io/ethers.js
- Homepage: https://github.com/ethers-io/ethers.js#readme
- Issues: https://github.com/ethers-io/ethers.js/issues
- Funding: https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2
- npm.io page: https://npm.io/package/@ethersproject/bignumber

## Dependencies (3)

- [bn.js](https://npm.io/package/bn.js.md) ^5.2.1
- [@ethersproject/bytes](https://npm.io/package/@ethersproject/bytes.md) ^5.8.0
- [@ethersproject/logger](https://npm.io/package/@ethersproject/logger.md) ^5.8.0

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 5.8.0 (latest) — 2025-02-26
- 5.7.0 — 2022-08-19
- 5.6.2 — 2022-05-24
- 5.6.1 — 2022-05-14
- 5.6.0 — 2022-03-10
- 5.5.0 — 2021-10-20
- 5.4.2 — 2021-09-16
- 5.4.1 — 2021-07-23
- 5.4.0 — 2021-06-26
- 5.3.0 — 2021-06-01
- 5.2.0 — 2021-05-20
- 5.1.1 — 2021-04-20
- 5.1.0 — 2021-03-30
- 5.0.15 — 2021-03-08
- 5.0.14 — 2021-02-01
- … 37 more at https://npm.io/package/@ethersproject/bignumber/versions

## README

Big Numbers
===========

This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js).

It is responsible for handling arbitrarily large numbers and mathematic operations.

For more information, see the documentation for [Big Numbers](https://docs.ethers.io/v5/api/utils/bignumber/)
and [Fixed-Point Numbers](https://docs.ethers.io/v5/api/utils/fixednumber/).


Importing
---------

Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers),
but for those with more specific needs, individual components can be imported.

```javascript
const {

    BigNumber,

    FixedFormat,
    FixedNumber,

    formatFixed,

    parseFixed

    // Types

    BigNumberish

} = require("@ethersproject/bignumber");
```


License
-------

MIT License

---
_Source: https://npm.io/package/@ethersproject/bignumber · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
