PHPackages                             anurat/laravel-thai-tax - 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. anurat/laravel-thai-tax

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

anurat/laravel-thai-tax
=======================

Thai tax calculation

1.0.6(5y ago)121MITPHPPHP &gt;=7CI failing

Since Jan 9Pushed 5y ago1 watchersCompare

[ Source](https://github.com/anurat/laravel-thai-tax)[ Packagist](https://packagist.org/packages/anurat/laravel-thai-tax)[ RSS](/packages/anurat-laravel-thai-tax/feed)WikiDiscussions master Synced 3d ago

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

laravel-thai-tax
================

[](#laravel-thai-tax)

This Laravel package allows you to calculate personal income tax according to Thai regulations.

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

[](#installation)

Tested on Laravel 8 but should be working on any version of Laravel.

```
composer require anurat/laravel-thai-tax

```

After installed, it can be used through `ThaiTax` facade.

```
use ThaiTax;

```

Usage
-----

[](#usage)

The simplest use of the library is to provide `netIncome()` (THB)
then call `incomeTax()`

```
ThaiTax::netIncome(500000)->incomeTax();
// 9500 THB
```

Net income is total incomes minus total expenses minus total deductions.
It is then used to calculate income tax according to personal income tax rate
e.g.

### Thai year

[](#thai-year)

You can also provide Thai year to calculate different income tax on different year as follow.

> If Thai year is not provided, the current year is used.

```
ThaiTax::thaiYear(2542)
    ->netIncome(500000)
    ->incomeTax();
// 42500 THB
```

> The earliest year it can calculate is 2542

### Incomes and Deductions

[](#incomes-and-deductions)

Net income can be calculated by using incomes and deductions,
so incomes and deductions can be provided instead of net income.

> `netIncome()` and (all types or incomes and deductions) should not be used together, as they will override each other.

#### Income

[](#income)

`income(float $income)` can be used for general type of incomes

```
ThaiTax::thaiYear(2564)
    ->income(250000)
    ->income(50000)
    ->income(15000)
    ->incomeTax();
// 250 THB
```

Also you can use more specific type of incomes
e.g. `salary(float $salaryPerMonth)` or `bonus(float $bonus)`.

```
ThaiTax::thaiYear(2564)
    ->income(100000)
    ->salary(50000)
    ->bonus(50000)
    ->incomeTax();
// 41000 THB
```

> salary() takes monthly salary as an argument so 50,000 will be 600,000 per year.

`income(array $incomes)` can also accept an array as an argument.

```
ThaiTax::thaiYear(2564)
    ->income([
        50000,
        50000,
        'salary' => 50000,
        'bonus' => 50000
    ])
    ->incomeTax();
// 41000 THB
```

#### Deduction

[](#deduction)

For general type of deductions `deduction()` can be used.

```
ThaiTax::thaiYear(2564)
    ->income(500000)
    ->deduction(100000)
    ->incomeTax();
// 4500 THB
```

Other deduction types are as follow.
It has the benefit of checking for specific rules for that type
e.g. home loan interest may not exceed 100,000 Baht,
it will automatically reduce to 100,000 Baht if more is provided.

`spouse(bool $hasSpouse)` // คู่สมรส

`children(int $noOfChildren)` // บุตร

`parents(int $noOfParents)` // บิดามารดา

`disabiltites(int $noOfDisabilities)` // ผู้พิการ/ทุพพลภาพ

`childBirth(float $cost)` // ฝากครรภ์และทำคลอด

`insurancePremium(float $premium)` // ประกันชีวิต

`annuityInsurancePremium(float $premium)` // ประกันชีวิตแบบบำนาญ

`homeLoanInterest(float $interest)` // ดอกเบี้ยซื้อที่อยู่อาศัย

`providentFund(float $fund)` // กองทุนสำรองเลี้ยงชีพ

`socialSecurity(float $security)` // ประกันสังคม

`donation(float $donation)` // บริจาค

`educationDonation(float $donation)` // บริจาคเพื่อการศึกษา/กีฬา

`politicalParty(float $donation)` // บริจาคพรรคการเมือง

`shopDeeMeeKeun(float $shop)` // ช๊อปดีมีคืน

```
ThaiTax::thaiYear(2564)
    ->income(1000000)
    ->spouse(true)
    ->children(2)
    ->parents(3)
    ->insurancePremium(50000)
    ->incomeTax();
// 39500 THB
```

`deduction()` can also accept an array as an argument.

```
ThaiTax::thaiYear(2564)
    ->income(1000000)
    ->deduction([
        'spouse' => true,
        'children' => 2,
        'parents' => 3,
        'insurancePremium' => 50000
    ])
    ->incomeTax();
// 39500 THB
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Total

6

Last Release

1947d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2355534?v=4)[Anurat Chapanond](/maintainers/anurat)[@anurat](https://github.com/anurat)

---

Top Contributors

[![anurat](https://avatars.githubusercontent.com/u/2355534?v=4)](https://github.com/anurat "anurat (35 commits)")

---

Tags

laravel-packagetaxthai

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/anurat-laravel-thai-tax/health.svg)

```
[![Health](https://phpackages.com/badges/anurat-laravel-thai-tax/health.svg)](https://phpackages.com/packages/anurat-laravel-thai-tax)
```

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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