# @hapi/formula

> Math and string formula parser.

Latest version **4.0.0** (published 2026-07-01) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install @hapi/formula
pnpm add @hapi/formula
yarn add @hapi/formula
bun add @hapi/formula
```

## Health

**Score 65/100 (B)** — status: active.

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2026-07-01 |
| First published | 2019-06-24 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=22 |
| Dependencies | 0 |
| Unpacked size | 17.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Maintainers | nlf, devinivy, wyatt, lloydbenson, cjihrig, marsup |
| Keywords | formula, math, parser, string |

## Links

- npm: https://www.npmjs.com/package/@hapi/formula
- Repository: https://github.com/hapijs/formula
- Homepage: https://github.com/hapijs/formula#readme
- Issues: https://github.com/hapijs/formula/issues
- npm.io page: https://npm.io/package/@hapi/formula

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2026-07-01
- 3.0.2 — 2023-02-19
- 3.0.0 — 2020-01-04
- 2.0.0 — 2019-10-07
- 1.2.0 — 2019-08-09
- 1.1.0 — 2019-06-24
- 1.0.0 — 2019-06-24

## README

# @hapi/formula

#### Math and string formula parser.

**formula** is part of the **joi** ecosystem.

### Visit the [joi.dev](https://joi.dev) Developer Portal for tutorials, documentation, and support

## Useful resources

- [Documentation and API](https://joi.dev/module/formula/)
- [Version status](https://joi.dev/resources/status/#formula) (builds, dependencies, node versions, licenses, eol)
- [Changelog](https://joi.dev/module/formula/changelog/)
- [Project policies](https://joi.dev/policies/)

## Acknowledgements

Inspired by [**fparse**](https://github.com/bylexus/fparse), copyright 2012-2018 Alexander Schenkel <alex@alexi.ch>

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