Skip to main content

Practical examples for integrating the CPF API into your applications.

JavaScript / TypeScript#

Calculate Monthly Contribution#

Batch Processing#

Get Age-Appropriate Rates#

Find OA, SA and MA Distribution Rates for an Age#

distributionRate gives the share of the total contribution credited to each account. For a 34-year-old:

So 62.17% of the total contribution goes to OA, 16.21% to SA and 21.62% to MA. To get dollar amounts for a salary, call POST /calculate with income and age and read distribution.


Python#

Basic Calculation#

Multi-Year Projection#

Compare Investment Returns#


React Hook#