PHPackages                             pdam/calculator - 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. pdam/calculator

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

pdam/calculator
===============

Calculator lib in PHP

v2.0.0(9y ago)09MITPHP

Since Dec 17Pushed 2y ago1 watchersCompare

[ Source](https://github.com/pawel-damasiewicz/php-calculator)[ Packagist](https://packagist.org/packages/pdam/calculator)[ RSS](/packages/pdam-calculator/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

PHP Calculator library
======================

[](#php-calculator-library)

⚠️ This is just a sandbox project, installing it as a package is not recomended.

[![Latest Stable Version](https://camo.githubusercontent.com/438f6d609f6b3ef9f480fe0d0d2af23940170c708187bdafd6dff7817a9cffbc/68747470733a2f2f706f7365722e707567782e6f72672f7064616d2f63616c63756c61746f722f762f737461626c65)](https://packagist.org/packages/pdam/calculator)[![Total Downloads](https://camo.githubusercontent.com/037abc512eb89569424ff9290251813bd3c6ec3a47cb56b2866590183d1354b5/68747470733a2f2f706f7365722e707567782e6f72672f7064616d2f63616c63756c61746f722f646f776e6c6f616473)](https://packagist.org/packages/pdam/calculator)[![Latest Unstable Version](https://camo.githubusercontent.com/365bb034d96a18a5e04dc11504174f5f4f379bec7233924f31da89e17b80d263/68747470733a2f2f706f7365722e707567782e6f72672f7064616d2f63616c63756c61746f722f762f756e737461626c65)](https://packagist.org/packages/pdam/calculator)[![License](https://camo.githubusercontent.com/ef0a855416da7ce6ae7cd1402eb9f52713f5381f280a8753e93d8b866de69aac/68747470733a2f2f706f7365722e707567782e6f72672f7064616d2f63616c63756c61746f722f6c6963656e7365)](https://packagist.org/packages/pdam/calculator)[![composer.lock](https://camo.githubusercontent.com/79d852f6e5c89e90e3ed076e48e2116b392a9af2323ef916619cd9369762a469/68747470733a2f2f706f7365722e707567782e6f72672f7064616d2f63616c63756c61746f722f636f6d706f7365726c6f636b)](https://packagist.org/packages/pdam/calculator)[![Code Climate](https://camo.githubusercontent.com/89ece61259ca2b6d3c9eb7962ef6d75ac090861df11e845d22536362b3d845f4/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f706177656c2d64616d617369657769637a2f7068702d63616c63756c61746f722f6261646765732f6770612e737667)](https://codeclimate.com/github/pawel-damasiewicz/php-calculator)

How to use
----------

[](#how-to-use)

- Install via composer

```
composer require pdam/php-calculator

```

- Create calculator

```
$calc = new \Pdam\Calculator\Decimal();

```

- Do operations

```
// Addition
$calc->doAddition(1, 4);

// Substraction
$calc->doSubstraction(4, 1);

// Multiplication
$calc->doMultiplication(2, 2);

// Division
$calc->doDivision(10, 2);

```

### Test

[](#test)

- [PHPUnit](https://phpunit.de/getting-started.html "PHPUnit")

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 52.8% 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 ~218 days

Total

2

Last Release

3582d ago

Major Versions

v1.0.0 → v2.0.02016-07-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/771713f9d1ebcee29f5e8e76c8c94bba126794b1ec58da8a3105f0c206153a62?d=identicon)[pawel-damasiewicz](/maintainers/pawel-damasiewicz)

---

Top Contributors

[![pawel-damasiewicz](https://avatars.githubusercontent.com/u/489857?v=4)](https://github.com/pawel-damasiewicz "pawel-damasiewicz (65 commits)")[![pawel-taat](https://avatars.githubusercontent.com/u/12796880?v=4)](https://github.com/pawel-taat "pawel-taat (58 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pdam-calculator/health.svg)

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

###  Alternatives

[webbycrown/blog-for-bagisto

Blog for Bagisto

257.0k](/packages/webbycrown-blog-for-bagisto)

PHPackages © 2026

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