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

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

sujalpatel/calculator
=====================

Simple Add, Sub and Multi Functions

v1.0.0(6y ago)281MITPHPPHP ^7.1CI failing

Since Oct 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/sujalpatel2209/calculator_package)[ Packagist](https://packagist.org/packages/sujalpatel/calculator)[ Docs](https://github.com/sujalpatel2209/calculator)[ RSS](/packages/sujalpatel-calculator/feed)WikiDiscussions master Synced today

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

Calculator
==========

[](#calculator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/dc7d769808231ef39ff2d591630cc1a055c0add4945baa7d68ac63e125a9ec8d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73756a616c706174656c2f63616c63756c61746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sujalpatel/calculator)[![Build Status](https://camo.githubusercontent.com/cab2bed1061ff87b6e04c4d7478f3e26204442da410911a051bb9f53b52f9893/68747470733a2f2f7472617669732d63692e6f72672f73756a616c706174656c323230392f63616c63756c61746f725f7061636b6167652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/sujalpatel2209/calculator_package)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7aa0b4de95b5dc7181b822aa9343caacbdbc6cca38c6c67e7db4634857a28dc9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73756a616c706174656c323230392f63616c63756c61746f725f7061636b6167652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sujalpatel2209/calculator_package/?branch=master)[![Code Intelligence Status](https://camo.githubusercontent.com/2e52c7d66130a28206de80b27c17e0b05827bec3dc6824c43f120dd004fa25f6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73756a616c706174656c323230392f63616c63756c61746f725f7061636b6167652f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/code-intelligence)[![Total Downloads](https://camo.githubusercontent.com/888cccd7d6495213d8be20a3bdaaafa85e0318e07b7bb9f2fd01566e56b69b1d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73756a616c706174656c2f63616c63756c61746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sujalpatel/calculator)

Simple Calculation Function Addition, Subtraction and Multiplication.

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

[](#installation)

You can install the package via composer:

```
composer require sujalpatel/calculator
```

Usage
-----

[](#usage)

**Add Function**

```
use Sujalpatel\Calculator\Calculator;

public function addition()
{
    return Calculator::add(5,5); // Answer: 5 + 5 = 5
}
```

**Sub Function**

```
use Sujalpatel\Calculator\Calculator;

public function subtraction()
{
    return Calculator::sub(10,5); // Answer: 10 - 5 = 5
}
```

**Multi Function**

```
use Sujalpatel\Calculator\Calculator;

public function multiplication()
{
    return Calculator::multi(2,5); // Answer: 2 * 5 = 10
}
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Sujal Patel](https://github.com/sujalpatel)
- [Laravel Package Boilerplate](https://laravelpackageboilerplate.com)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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

2412d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/194ff2229ad4ab86fd82f4edcf14e6b2d58691f2fd5b8fe8f3d2a5e20a04fdbf?d=identicon)[sujalpatel022](/maintainers/sujalpatel022)

---

Top Contributors

[![php-wmt-sujal](https://avatars.githubusercontent.com/u/17723505?v=4)](https://github.com/php-wmt-sujal "php-wmt-sujal (16 commits)")[![sujalpatel2209](https://avatars.githubusercontent.com/u/24549963?v=4)](https://github.com/sujalpatel2209 "sujalpatel2209 (2 commits)")

---

Tags

calculatorfirstpackagesujalpatelcalculatorsujalpatel

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[markrogoyski/ipv4-subnet-calculator

Network calculator for subnet mask and other classless (CIDR) network information.

177813.7k6](/packages/markrogoyski-ipv4-subnet-calculator)[ballen/distical

A distance (Lat/Long) calculation library for PHP

40180.2k2](/packages/ballen-distical)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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