Skip to content

Repository files navigation

SweldoCalc PH

Accurate Philippine salary, tax, and compensation calculator — built for employees and freelancers.

Stack Stack Stack Stack


Features

  • TRAIN Law — All 6 monthly withholding tax brackets per RA 10963
  • SSS — Full 2024 contribution table including WISP and EC; ₱35,000 MSC ceiling
  • PhilHealth — 5% total premium with ₱10k–₱100k salary floor/ceiling
  • Pag-IBIG (HDMF) — 2% each side, ₱10,000 maximum fund salary cap
  • Freelancer / Self-Employed — 8% flat tax or graduated rates with 40% OSD
  • Semi-Monthly (15/30) — All deductions split correctly per pay period
  • 13th Month Pay — ₱90,000 aggregate tax-exempt cap with overage flagging
  • Donut & Bar Charts — Pay distribution and employer total cost breakdown (Recharts)
  • Detailed Breakdown Table — Per-item employee vs. employer share with legal basis notes
  • Copy Payslip — Clean plaintext summary ready to paste into Slack or email
  • Shareable URL — State encoded via ?salary=&regime=&freq= query params
  • Dark / Light Mode — System-default detection with toggle persistence

Tech Stack

Layer Technology
Framework React 19 + TypeScript 6
Build tool Vite 8
Styling Tailwind CSS v4 (@tailwindcss/vite)
Charts Recharts
Icons Lucide React
Linter Oxlint

Getting Started

# Install dependencies
npm install

# Start development server
npm run dev

Open http://localhost:5173 in your browser.

# Type-check
npx tsc --noEmit

# Production build
npm run build

# Preview production build
npm run preview

Tax Rules Reference

TRAIN Law Monthly Withholding Tax (BIR)

Monthly Taxable Income Base Tax Rate on Excess
Up to ₱20,833.33 ₱0.00 0% (Exempt)
₱20,833.34 – ₱33,333.33 ₱0.00 15%
₱33,333.34 – ₱66,666.67 ₱1,875.00 20%
₱66,666.68 – ₱166,666.67 ₱8,541.67 25%
₱166,666.68 – ₱666,666.67 ₱33,541.67 30%
Above ₱666,666.67 ₱183,541.67 35%

Taxable Income = Gross Pay − SSS/PhilHealth/Pag-IBIG employee shares − Non-taxable allowances

SSS (2024)

  • Employee Regular: 5% of MSC, max ₱1,000/month
  • Employee WISP: up to ₱750/month (for MSC ≥ ₱23,000)
  • Employer Regular: 9.5% of MSC, max ₱2,090
  • Employer EC: ₱10–₱30
  • Maximum MSC: ₱35,000

PhilHealth

  • Total premium: 5% of basic monthly salary
  • Employee share: 2.5% | Employer share: 2.5%
  • Salary floor: ₱10,000 | Ceiling: ₱100,000

Pag-IBIG (HDMF)

  • Employee & employer: 2% each
  • Maximum fund salary basis: ₱10,000 → max ₱200/month per side

13th Month Pay

  • Mandatory for all employees who worked at least one month
  • Standard = 1/12 of total annual basic salary
  • Tax-exempt up to ₱90,000/year (combined with other bonuses per TRAIN Law)

Project Structure

src/
├── calculator.ts          # Core computation engine (tax, SSS, PhilHealth, Pag-IBIG)
├── App.tsx                # Root layout, dark mode, URL state, tab routing
├── index.css              # Tailwind v4 theme tokens & class-based dark mode variant
└── components/
    ├── InputPanel.tsx     # Employment type, salary input, presets, advanced section
    ├── ResultsPanel.tsx   # Stat cards, charts, breakdown table, copy payslip
    ├── FaqPanel.tsx       # Tax guide accordion (TRAIN, SSS, PhilHealth, etc.)
    ├── Card.tsx           # Card, CardHeader, CardBody primitives
    ├── FormControls.tsx   # Input, Select, Toggle, SegmentedControl
    ├── Badge.tsx          # Badge, StatCard components
    └── Accordion.tsx      # Collapsible FAQ sections

Disclaimer

SweldoCalc PH is intended for reference and estimation purposes only. Always verify computations with your HR department, a licensed payroll professional, or the Bureau of Internal Revenue (BIR) for official tax obligations.


Legal Basis

  • RA 10963 — Tax Reform for Acceleration and Inclusion (TRAIN) Act
  • RA 11199 — Social Security Act of 2018 (SSS WISP)
  • PhilHealth Circular No. 2023-0001 — 5% premium rate
  • RA 9679 — Home Development Mutual Fund Law (Pag-IBIG)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages