PHPackages                             cowshedworks/calculators - 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. cowshedworks/calculators

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

cowshedworks/calculators
========================

A collection of useful calculators

0.0.2(5y ago)06MITPHPPHP &gt;=7.4

Since Nov 13Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/cowshedworks/calculators)[ Packagist](https://packagist.org/packages/cowshedworks/calculators)[ RSS](/packages/cowshedworks-calculators/feed)WikiDiscussions master Synced 3mo ago

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

Calculators
===========

[](#calculators)

Calculators is a factory for building calculations in a fluent way

**PLEASE NOTE** this is very WIP at the moment, it is really a way to test using packagist to release a PHP package.

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

[](#installation)

Use the package manager [composer](https://getcomposer.org/) to install.

```
composer require cowshedworks/calculators
```

Usage
-----

[](#usage)

```
use CowshedWorks\Calculators\CalculationFactory;

$calculator = (new CalculationFactory())
    ->using('p1')
    ->multiplyBy(10)
    ->multiplyBy('p2')
    ->build();

$calculator(10, 30);
// prints 3000

$circumferenceFromDiameter = (new CalculationFactory())
    ->using('p1')
    ->multiplyBy(pi())
    ->build();

$circumferenceFromDiameter(10)
// prints 31.41592653589793

$radiusFromCircumference = (new CalculationFactory())
    ->using('p1')
    ->divideBy(
        (new CalculationFactory())
            ->using(pi())
            ->multiplyBy(2)
    )
    ->build();

$radiusFromCircumference(10)
1.5915494309189497
```

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

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License
-------

[](#license)

[MIT](LICENCE.md)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance45

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Total

2

Last Release

1978d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25663396?v=4)[Gavin Phillips](/maintainers/cowshedworks)[@cowshedworks](https://github.com/cowshedworks)

---

Top Contributors

[![cowshedworks](https://avatars.githubusercontent.com/u/25663396?v=4)](https://github.com/cowshedworks "cowshedworks (52 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cowshedworks-calculators/health.svg)

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

###  Alternatives

[leth/ip-address

IPv4 and IPv6 address and subnet classes with awesome utility functions.

62750.3k3](/packages/leth-ip-address)[vonage/vonage-laravel

Service provider for Laravel for the Vonage PHP SDK

391.3M](/packages/vonage-vonage-laravel)

PHPackages © 2026

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