PHPackages                             slashequip/sumy - 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. slashequip/sumy

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

slashequip/sumy
===============

Simple, chainable calculation library.

v0.3.1(5y ago)0887↓64.1%MITPHPPHP ^7.1|^8.0

Since Jan 23Pushed 5y ago1 watchersCompare

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

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

Sumy
====

[](#sumy)

Sumy is a simple, chainable calculation library.

It started as a simple class in one of our projects but after needing and implementing the class in other projects we decided to turn it into a reusable package.

Here is a quick example:

```
$sumy = new Sumy();
$sumy->add(100)->divide(2);

$sumy->get(); // 50
```

Installation
------------

[](#installation)

You can install this [package](https://packagist.org/packages/slashequip/sumy) by using [Composer](https://getcomposer.org/):

```
composer require slashequip/sumy
```

Getting Started
---------------

[](#getting-started)

Sumy is super simple to use, first you need to initialize an instance of Sumy in your project, you can do this a few ways:

```
$sumyOne = new Sumy();
$sumyOne->get(); // 0

$sumyTwo = new Sumy(100);
$sumyTwo->get(); // 100

$sumyThree = new Sumy($sumyTwo);
$sumyThree->get() // 100
```

Math
----

[](#math)

```
$sumy = new Sumy(1000);
$sumy->add(140)->get(); // 1140
```

BeforeFunctionAfter1000`->add(140)`11401000`->subtract(140)`8601000`->multiply(4.6)`46001000`->divide(50)`20961`->sqrt()`3124`->pow(50)`576Chaining
--------

[](#chaining)

All Sumy's math methods can be chained:

```
$sumy = new Sumy(100);
$sumy->add(400)->mulitply(4)->divide(2)->subtract(39)->sqrt()->pow(3);

$sumy->get(); //29791
```

Licence
-------

[](#licence)

Copyright 2021 SlashEquip OÜ.

Distributed under the MIT licence. See LICENCE.txt for further information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~482 days

Total

4

Last Release

1955d ago

PHP version history (2 changes)0.1.1PHP &gt;=5.6.0

v0.3.0PHP ^7.1|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/fbb854e09eb0aafbd7b8dc4517599ced8da6b8528c9d4ddfe82a4fc9691e8796?d=identicon)[slashequip](/maintainers/slashequip)

---

Top Contributors

[![slashequip](https://avatars.githubusercontent.com/u/2316916?v=4)](https://github.com/slashequip "slashequip (9 commits)")

---

Tags

mathcalculationadditiondivisionmultiplicationsubtractionsquare rootpower of

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/slashequip-sumy/health.svg)

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

###  Alternatives

[brick/math

Arbitrary-precision arithmetic library

2.1k504.0M277](/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)[mjaschen/phpgeo

Simple Yet Powerful Geo Library

1.6k8.6M22](/packages/mjaschen-phpgeo)[phpseclib/bcmath_compat

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

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

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

2751.4M5](/packages/rubix-tensor)[php-decimal/php-decimal

Correctly-rounded arbitrary precision decimal floating point

781.0M9](/packages/php-decimal-php-decimal)

PHPackages © 2026

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