A modern web application to calculate CPF (Central Provident Fund) contributions following the 2023 income ceiling changes announced by Singapore's Ministry of Finance.
- 💰 Accurate CPF Calculations - Compute employee and employer contributions based on current income ceilings
- 📊 Age-Based Rates - Automatic calculation using 8 different age brackets with varying contribution rates
- 📈 Distribution Breakdown - View OA (Ordinary Account), SA (Special Account), and MA (MediSave Account) allocations
- 🕒 Interactive Timeline - Visualise CPF income ceiling changes from 2023 to 2026 with an interactive timeline
- 📱 Mobile-Friendly - Responsive design with PWA support for offline use
- 📄 PDF Export - Download your CPF calculation results as a PDF document
- 🎨 Modern UI - Built with Next.js 16, React 19, and Tailwind CSS
- ⚡ Fast & Lightweight - Optimized performance with Turbopack
Following the Ministry of Finance announcement at Singapore Budget 2023 (13 February 2023), the CPF income ceiling is being progressively raised:
- Previous ceiling: $6,000 (before September 2023)
- Current target: $8,000 (by September 2026)
This calculator helps Singaporeans estimate their take-home income after CPF contributions under the new ceiling structure while accounting for age-specific contribution and distribution rates.
- Framework: Next.js 16 with React 19
- Language: TypeScript
- Styling: Tailwind CSS 4.x with shadcn/ui components
- State Management: Jotai
- UI Components: Base UI primitives
- Charts: Recharts
- Testing: Vitest with React Testing Library
- Linting: Biome
- Package Manager: pnpm 10.x
- Deployment: Vercel
- Node.js 18+
- pnpm 10.x (automatically enforced via
packageManagerfield)
# Clone the repository
git clone https://github.com/ruchernchong/simplycpf.git
cd simplycpf
# Install dependencies
pnpm install
# Start development server
pnpm devThe application will be available at http://localhost:3000.
# Start development server
pnpm dev
# Build for production
pnpm build
# Start production server
pnpm start
# Run linting
pnpm lint
# Type checking
pnpm typecheck
# Run tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Generate coverage report
pnpm test:coverageThe application includes a comprehensive API documentation portal at /developer with:
- Getting Started - Quick start guide for developers
- API Reference - Complete documentation for all 12 endpoints
- Examples - Code samples in JavaScript/TypeScript and Python
- Changelog - Version history and updates
The site provides LLM-friendly endpoints following the llms.txt specification:
/llms.txt- Concise site summary for AI assistants/docs/llms-full.txt- Complete documentation in plain text format
| Category | Endpoints |
|---|---|
| Calculation | /calculate, /calculate/batch, /projection |
| Age Groups | /age-groups, /age-group/find, /age/from-birthdate |
| Income Ceiling | /ceiling, /ceiling/timeline |
| Interest Rates | /interest-rates, /interest-rates/smra, /interest-rates/trend |
| Investment | /investment-comparison |
src/
├── app/ # Next.js app directory (routes, layouts)
│ └── developer/ # Developer portal (Fumadocs)
├── atoms/ # Jotai state atoms
├── components/ # React components
│ └── ui/ # shadcn/ui components
├── data/ # CPF age groups and rates data
├── lib/ # Core calculation logic
├── types/ # TypeScript type definitions
├── constants/ # CPF income ceilings by year
└── utils/ # Utility functions
content/
└── docs/ # Developer portal MDX content
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- CPF contribution rates and distribution data sourced from Singapore's CPF Board
- Income ceiling changes based on Ministry of Finance Budget 2023 announcements
Ru Chern Chong
Made with ❤️ for the Singapore community