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

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

homord/tax-calculator
=====================

A Laravel package to calculate taxes for multiple countries

00PHP

Since Aug 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/omoh09/laravel-tax-calculator)[ Packagist](https://packagist.org/packages/homord/tax-calculator)[ RSS](/packages/homord-tax-calculator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Tax Calculator Package
==============================

[](#laravel-tax-calculator-package)

[![Packagist Version](https://camo.githubusercontent.com/52539fc78ebe6609a5545d147737b60447f7e70d5f7412494ed4ef9d7dc5f0a1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686f6d6f72642f7461782d63616c63756c61746f72)](https://camo.githubusercontent.com/52539fc78ebe6609a5545d147737b60447f7e70d5f7412494ed4ef9d7dc5f0a1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686f6d6f72642f7461782d63616c63756c61746f72)[![License](https://camo.githubusercontent.com/ac164ce2856497606a1755300751d6cc51a1f579531a5321f4e9a119d8244d85/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6f6d6f6830392f6c61726176656c2d7461782d63616c63756c61746f72)](https://camo.githubusercontent.com/ac164ce2856497606a1755300751d6cc51a1f579531a5321f4e9a119d8244d85/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6f6d6f6830392f6c61726176656c2d7461782d63616c63756c61746f72)

Introduction
------------

[](#introduction)

The **Laravel Tax Calculator** package provides a flexible and extensible way to calculate taxes for different countries. It supports country-specific tax calculations and can be easily extended to include additional countries as needed.

Features
--------

[](#features)

- Calculate annual and monthly taxes based on country-specific tax laws.
- Easily extendable to support additional countries.
- Clean and organized code using Strategy and Factory design patterns.

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

[](#installation)

You can install the package via Composer:

```
composer require DrOmoh/tax-calculator
```

After installing, publish the configuration file by running:

```
php artisan vendor:publish --provider="YourVendorName\TaxCalculator\Providers\TaxCalculatorServiceProvider"
```

Usage
-----

[](#usage)

To calculate taxes, first, create an instance of the tax calculator for the specific country. Then, use it to calculate the annual and monthly taxes

```
use YourVendorName\TaxCalculator\Factories\TaxCalculatorFactory;

$calculator = TaxCalculatorFactory::createCalculator('Nigeria');

// Sample data
$annualEarnings = 1440000.00;
$annualPen = 69120.00;
$annualNhf = 9000.00;

$annualTax = $calculator->calculateAnnualTax($annualEarnings, $annualPen, $annualNhf);
$monthlyTax = $calculator->calculateMonthlyTax($annualTax);

echo "Annual Tax: {$annualTax}\n";
echo "Monthly Tax: {$monthlyTax}\n";
```

Testing
-------

[](#testing)

To run the package's tests, execute the following command

```
vendor/bin/phpunit
```

Coding Standards
----------------

[](#coding-standards)

The package follows the PSR-2 coding standard. You can check the code style by running:

```
vendor/bin/phpcs --standard=PSR2 src/
```

Static Analysis
---------------

[](#static-analysis)

Run PHPStan to perform static analysis

```
vendor/bin/phpstan analyse src --level=max
```

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

[](#contributing)

Contributions are welcome! Please submit a pull request or open an issue on GitHub.

*Steps to Contribute*
---------------------

[](#steps-to-contribute)

- Fork the repository.
- Create a new branch (git checkout -b feature/new-country-tax-calculator).
- Make your changes.
- Commit your changes (git commit -m 'Add tax calculator for NewCountry').
- Push to the branch (git push origin feature/new-country-tax-calculator).
- Open a pull request.

License This package is open-sourced software licensed under the MIT license.

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[symfony/polyfill-iconv

Symfony polyfill for the Iconv extension

1.8k352.7M84](/packages/symfony-polyfill-iconv)[daverandom/libdns

DNS protocol implementation written in pure PHP

16239.1M9](/packages/daverandom-libdns)[kelunik/certificate

Access certificate details and transform between different formats.

10938.3M8](/packages/kelunik-certificate)[avored/module-installer

A composer plugin, to help install modules for AvoREd e commerce applications.

139.1k14](/packages/avored-module-installer)

PHPackages © 2026

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