Cek gaji bulanan kamu setelah potong pajak dan iuran BPJS dengan kalkulator gaji. Gampang banget, cuma butuh sebentar!
MySaly is an Indonesian salary calculator that helps you estimate your monthly take-home pay after deductions. It calculates tax (PPh 21) and BPJS (Health and Employment) contributions based on current Indonesian regulations.
The calculator provides a detailed breakdown of:
- Monthly and annual tax calculations
- BPJS Health contributions (employee and employer portions)
- BPJS Employment contributions (employee and employer portions)
- Final take-home salary after all deductions
- React 18 - UI library for building the interface
- TypeScript - Type-safe JavaScript for better code quality
- Vite - Fast build tool and development server
- Tailwind CSS - Utility-first CSS framework for styling
- Headless UI - Unstyled, accessible UI components
The project follows a feature-based organization pattern:
src/
├── components/ # Reusable UI components
│ ├── ui/ # Base UI components
│ ├── footer.tsx # Footer component
│ ├── info.tsx # Information/FAQ section
│ └── layout/ # Layout components
├── features/ # Feature-specific modules
│ └── salary-calculator/
│ ├── components/ # Salary calculator components
│ ├── hooks/ # Custom hooks for salary calculations
│ └── index.ts # Feature exports
├── hooks/ # Global custom hooks
├── services/ # Business logic services
├── constants/ # Application constants
├── types/ # TypeScript type definitions
├── utils/ # Utility functions
└── data/ # Static data
- Node.js (v16 or higher)
- npm or yarn
- Clone the repository:
git clone https://github.com/njirolu/mysaly.git
cd mysaly- Install dependencies:
npm install
# or
yarn install- Start the development server:
npm run dev
# or
yarn dev- Open your browser and navigate to
http://localhost:5173
- Build the application:
npm run build
# or
yarn build- Preview the production build:
npm run preview
# or
yarn preview- Enter your monthly gross salary in the "Gaji Kotor Bulanan" field
- Select your marital status from the dropdown:
- "Belum Kawin" (Single)
- "Kawin" (Married)
- Select the number of dependents (0-3)
- Click "Hitung Gaji" to calculate your net salary
The calculator will display:
- Tax calculation details
- BPJS Health contribution breakdown
- BPJS Employment contribution breakdown
- Your final net salary
The calculator follows Indonesian tax regulations:
- Annualized Salary: Monthly salary × 12
- PTKP (Penghasilan Tidak Kena Pajak):
- Single (TK/0): Rp 54,000,000
- Single with 1 dependent (TK/1): Rp 58,500,000
- Single with 2 dependents (TK/2): Rp 63,000,000
- Single with 3 dependents (TK/3): Rp 67,500,000
- Married (K/0): Rp 58,500,000
- Married with 1 dependent (K/1): Rp 63,000,000
- Married with 2 dependents (K/2): Rp 67,500,000
- Married with 3 dependents (K/3): Rp 72,000,000
- PKP (Penghasilan Kena Pajak): Annualized Salary - PTKP
- Position Cost: 5% of annualized salary (min Rp 500,000, max Rp 6,000,000)
- Tax Rates:
- Up to Rp 60,000,000: 5%
- Rp 60,000,001 - Rp 250,000,000: 15%
- Rp 250,000,001 - Rp 500,000,000: 25%
- Rp 500,000,001 - Rp 5,000,000,000: 30%
- Above Rp 5,000,000,000: 35%
BPJS Health:
- Employee: 1% of monthly salary (capped at Rp 12,000,000)
- Employer: 4% of monthly salary (capped at Rp 12,000,000)
BPJS Employment:
- Employee: 2% of monthly salary
- Employer: 3.7% of monthly salary
We welcome contributions to improve MySaly! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style and conventions
- Add appropriate TypeScript types for new code
- Include JSDoc comments for functions and components
- Test your changes thoroughly
- Ensure the application builds successfully
- Use TypeScript for all new code
- Follow React best practices
- Use functional components with hooks
- Implement proper error handling
- Write self-documenting code with meaningful variable names
This project is licensed under the MIT License - see the LICENSE file for details.
See CHANGELOG.md for a detailed history of changes.
If you encounter any issues or have questions, please open an issue on the GitHub repository.