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

ActiveLibrary

gaurangsharma/gst-calculator
============================

Simplifies GST calculation and operations

2.0.0(4y ago)1121MITPHPPHP &gt;=7.4

Since Oct 10Pushed 4y ago1 watchersCompare

[ Source](https://github.com/gaurang-commits/gst-calculator)[ Packagist](https://packagist.org/packages/gaurangsharma/gst-calculator)[ Docs](https://github.com/gaurang-commits/gst-calculator)[ RSS](/packages/gaurangsharma-gst-calculator/feed)WikiDiscussions master Synced 1mo ago

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

Simplifies GST calculation and operations
=========================================

[](#simplifies-gst-calculation-and-operations)

[![Latest Version on Packagist](https://camo.githubusercontent.com/32076e7211bffd657f9af75818d1b415d2530c66503c46bb5f4c34058f465032/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67617572616e67736861726d612f6773742d63616c63756c61746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gaurangsharma/gst-calculator)[![GitHub Tests Action Status](https://camo.githubusercontent.com/27ffc965d4133e6f3e7c98136358bc66c11a2ba5c3126c6555ba81b1bb2d7ba1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f67617572616e672d636f6d6d6974732f6773742d63616c63756c61746f722f54657374733f6c6162656c3d7465737473)](https://github.com/gaurang-commits/gst-calculator/actions?query=workflow%3ATests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/3bdd92817be5ebbb3cc3936187b1fe6a5f1789140a2aa39e1c25242b3384862b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f67617572616e672d636f6d6d6974732f6773742d63616c63756c61746f722f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/gaurang-commits/gst-calculator/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/a536e762505d8f1796812f2ec13df2b5c1e5042875c1547c8bc27d0e0dbe6e65/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67617572616e67736861726d612f6773742d63616c63756c61746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gaurangsharma/gst-calculator)

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

[](#installation)

You can install the package via composer:

```
composer require gaurangsharma/gst-calculator
```

Usage
-----

[](#usage)

```
use Gaurang\GstCalculator\Calculator;

echo Calculator::fromCost(100, 18)->getGst();

echo Calculator::fromCost(1000, 9)->getTotalWithGst();
```

New state functions :

```
echo Calculator::stateData("HR", "DL")->getGstType();

echo Calculator::stateData("Haryana", "Delhi", 1020, 5)->getAllData();
```

stateData() accepts 4 arguements sourceState, destinationState, cost, rate.

- sourceState and destinationState can be a state code, state alpha code, or a state name

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Gaurang Sharma](https://github.com/gaurang-commits)
- [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

Community8

Small or concentrated contributor base

Maturity54

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

Total

3

Last Release

1673d ago

Major Versions

1.0.1 → 2.0.02021-10-12

PHP version history (2 changes)1.0.0PHP &gt;=7.2

1.0.1PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/4c011e453e2d26212f6cf1dc351d9c1255028867cf2db521d0b4daa23f64da1a?d=identicon)[gaurangSharma](/maintainers/gaurangSharma)

---

Top Contributors

[![gaurang-commits](https://avatars.githubusercontent.com/u/78213821?v=4)](https://github.com/gaurang-commits "gaurang-commits (36 commits)")

---

Tags

gaurangsharmagst-calculator

###  Code Quality

TestsPest

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

PHPackages © 2026

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