PHPackages                             andersonrezende/formula-executor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. andersonrezende/formula-executor

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

andersonrezende/formula-executor
================================

Formula converter and executor in string format

v1.0.0(3y ago)06MITPHPPHP &gt;=7.0

Since Jul 3Pushed 3y ago1 watchersCompare

[ Source](https://github.com/AndersonRezende/formula-executor)[ Packagist](https://packagist.org/packages/andersonrezende/formula-executor)[ RSS](/packages/andersonrezende-formula-executor/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

formula-executor [![Tests](https://github.com/AndersonRezende/formula-executor/actions/workflows/php.yml/badge.svg)](https://github.com/AndersonRezende/formula-executor/actions/workflows/php.yml/badge.svg)
=============================================================================================================================================================================================================

[](#formula-executor-)

Simple math expression calculator

Install:
--------

[](#install)

```
$ composer require nxp/math-executor

```

Support:
--------

[](#support)

- Multiplication
- Division
- Addition
- Subtraction
- Exponentiation
- Parentheses

Basic usage:
------------

[](#basic-usage)

```
use Andersonrezende\FormulaExecutor\FormulaExecutor;

$formula = '(a * (b + c) / d - e)';
$values = array('a' => 5, 'b' => 3, 'c' => 2, 'd' => 4, 'e' => 6);
$formulaExecutor = new FormulaExecutor($formula, $values);
$resultFormula = $formulaExecutor->execute();
```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1141d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22622758?v=4)[Anderson Freire Rezende](/maintainers/AndersonRezende)[@AndersonRezende](https://github.com/AndersonRezende)

---

Top Contributors

[![AndersonRezende](https://avatars.githubusercontent.com/u/22622758?v=4)](https://github.com/AndersonRezende "AndersonRezende (1 commits)")

---

Tags

additiondivisionexecutorexponentiationformulainfixmathmultiplicationnotationpolishpostfixsubtractionconvertermathexpressioncalculatorformulapostfixinfix

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/andersonrezende-formula-executor/health.svg)

```
[![Health](https://phpackages.com/badges/andersonrezende-formula-executor/health.svg)](https://phpackages.com/packages/andersonrezende-formula-executor)
```

###  Alternatives

[brick/math

Arbitrary-precision arithmetic library

2.2k564.4M497](/packages/brick-math)[nxp/math-executor

Simple math expressions calculator

2301.9M8](/packages/nxp-math-executor)[spatie/regex

A sane interface for php's built in preg\_\* functions

1.1k20.9M72](/packages/spatie-regex)[madorin/matex

PHP Mathematical expression parser and evaluator

1161.3M1](/packages/madorin-matex)[matthiasmullie/path-converter

Relative path converter

10333.0M10](/packages/matthiasmullie-path-converter)[denissimon/formula-parser

Parsing and evaluating mathematical formulas given as strings.

80351.1k3](/packages/denissimon-formula-parser)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
