PHPackages                             gigac/happymath - 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. gigac/happymath

ActiveLibrary

gigac/happymath
===============

Do math operation in spreadsheets formula style

v1.0.2(7y ago)023MITPHPPHP &gt;=5.6

Since Jun 20Pushed 7y ago1 watchersCompare

[ Source](https://github.com/gigac/happymath)[ Packagist](https://packagist.org/packages/gigac/happymath)[ Docs](https://github.com/gigac/happymath)[ RSS](/packages/gigac-happymath/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

HappyMath
=========

[](#happymath)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d3eb9524fb2102661686e7c0dc4945620e354f73c4fb96f8d577d907f331d74c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f47696761632f48617070794d6174682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Gigac/HappyMath)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/1a2e13d744a1517c21bba391a987d114d45696546d65ec0b31845d79eacb36b1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f47696761632f48617070794d6174682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Gigac/HappyMath)

Calculate expressions formula style like spreadsheets

Install
-------

[](#install)

Via Composer

```
$ composer require gigac/happymath
```

Usage
-----

[](#usage)

```
$expression = 'AVG(5,3,SUM(1,2,MAX(1,2),3,12))';
$result = new Gigac\HappyMath\HappyMath($expression);
```

Testing
-------

[](#testing)

```
$ ./vendor/bin/phpunit
```

ToDo
----

[](#todo)

- Fix subtraction
- Refactor structure
- Finish tests
- Check valid expression
- ...

Credits
-------

[](#credits)

- [Argir Popov](https://github.com/gigac)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 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

Every ~44 days

Total

3

Last Release

2791d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5bb6d2235a2208157cc45c8839ed5e8d7deaa638eefb7f23c703d59c0976dee3?d=identicon)[gigac](/maintainers/gigac)

---

Top Contributors

[![gigac](https://avatars.githubusercontent.com/u/7447853?v=4)](https://github.com/gigac "gigac (7 commits)")

---

Tags

mathhappy

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gigac-happymath/health.svg)

```
[![Health](https://phpackages.com/badges/gigac-happymath/health.svg)](https://phpackages.com/packages/gigac-happymath)
```

###  Alternatives

[brick/math

Arbitrary-precision arithmetic library

2.1k504.0M276](/packages/brick-math)[markrogoyski/math-php

Math Library for PHP. Features descriptive statistics and regressions; Continuous and discrete probability distributions; Linear algebra with matrices and vectors, Numerical analysis; special mathematical functions; Algebra

2.4k7.1M40](/packages/markrogoyski-math-php)[phpseclib/bcmath_compat

PHP 5.x-8.x polyfill for bcmath extension

16720.7M16](/packages/phpseclib-bcmath-compat)[rubix/tensor

A library and extension that provides objects for scientific computing in PHP.

2751.4M5](/packages/rubix-tensor)[nxp/math-executor

Simple math expressions calculator

2281.7M7](/packages/nxp-math-executor)[madorin/matex

PHP Mathematical expression parser and evaluator

1161.2M1](/packages/madorin-matex)

PHPackages © 2026

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