Building a Canadian OAS/GIS Calculator
Tags: Canada, Pensions, Retirement, Programming, Calculator

Building a Canadian OAS/GIS Calculator

Hoping to help some seniors while “scratching an itch”

Photo by ’Robbie Owen-Wahl’ https://www.freeimages.com/photographer/Meditations-62723

TLDR;

The site for the calculator: https://minghz.github.io/canpension/

Canada offers Old Age Security (OAS) for Canadian residents over the age of 65. For those that qualify for this monthly payment, an additional monthly payment called the Guaranteed Income Supplement (GIS) may also apply.

Its hard to determine the actual amounts receivable for OAS and GIS using the available official sources. These sources are also not transparent over how the amounts are calculated. As a result, it prompted me to build an online “calculator” that should make the process simpler.

This write-up summarizes the process and discoveries I’ve encountered when building this calculator.

Inspiration

My parents retired late 2019, and early 2020. Being relatively recent immigrants, it is quite difficult for them to navigate around English, so I stepped in to help.

It surprised me how difficult it was to understand the rules around this, and how unnecessarily convoluted it all was. Specially around the opacity of the rules around receiving Partial OAS for those that have not lived in Canada for 40 years or more (most of their lives).

A Bit of Context

The Canadian government offers a series of look-up tables as reference. These tables state how much one receives from OAS, and GIS, the later being inversely proportional to the annual income received.

They do not have any information on how to derive Partial OAS values or receivable GIS derived from the receipt of Partial OAS. All of their public data are for Full OAS recipients — those that have lived in Canada for 40 or more years.

It also stuck me as strange how the tables are presented. There are a total of 231 separate lookup table pages. Each table has essentially the following columns:

Annual income range. Increases by $24 dollars every row.

Monthly receivable GIS: Decreases by one dollar every row.

For example:

Screen shot taken from Gov website https://www.canada.ca/en/services/benefits/publicpensions/cpp/old-age-security/payments/tab1-1.html

The pattern repeats itself throughout the entire first table, the second table, and so on. This seemed like an incredible waste of space. Why have look-up tables that are simply repeating a pattern? Why not simply present a calculation formula?

The Variables

OAS qualification: A Boolean really. Not qualifying for OAS means no GIS either. Qualifying for it means receiving both OAS and GIS.

Years lived in Canada: Controls how much OAS one can receive. Minimum of 10 years. One can receive what is called “partial OAS” if they have lived for less than 40 years in Canada. Having “partial OAS” also comes with other complications when calculating GIS.

Annual Income: Mostly affects how GIS and Allowance one can receive. This amount is non-inclusive of received OAS and GIS.

Wanted Results

Receivable monthly OAS: The amount one would receive per month of OAS.

Receivable monthly GIS: The amount one would receive per month of GIS.

At the end of the day, we just want to know the total one can receive monthly from the Government. As in, receivable OAS + GIS.

Step 1: Full OAS vs Partial OAS

This calculation is easy. Full OAS is a predetermined amount by the government of Canada, and it updates about once a year — not much!

As of Q4 of 2020, it is $614.14.

Partial OAS is calculated by taking the ratio of years lived in Canada and multiplied by the full OAS amount.

where “years in Canada” is between 10 and 40

There is an upper limit though. OAS would not be given to you if you already make a comfortable income. For example, with an Annual Income more than $128,149 (as of Q4 of 2020).

Step 2: Calculating receivable GIS

I decided to start with the simplest case. A single or widowed senior over the age of 65. How much would they get in GIS monthly?

From the first set of given tables, and after some light Googling, it is simple to summarize the following pattern: For every additional $2 dollars of monthly income, receivable monthly GIS decreased by $1 dollar. This means that the amount of receivable GIS would decrease linearly with respects to the increase in annual income.

Except it was not!

First Hurdle: A step-function with data points over 51 tables

Testing my calculations against the official tables would yield me results that were off by a couple hundred dollars a month on the upper recesses of the annual income ranges.

I wrote a simple script to parse the tables to try and find a pattern. It turns out, the actual behaviour from the tables looked approximately like this instead.

The decrease of receivable GIS is much steeper Between annual incomes of $2,040 and $8,880. Most strangely, instead of being a linearly steeper decrease, it is a step-wise function with a “jagged” shape. That middle portion averages out to a -0.916 slope, compared to the -0.5 slope on the ends.

The reason behind this “jiggedy jaggedy” behaviour is really beyond me. Why not just average it out to a ~13-dolar annual range increase interval for every dollar discounted from receivable GIS? Some obscure reason perhaps, but one that I will not be able to figure out given the available information from the Gov. website.

What is more interesting is the big picture here. The $2,040 to $8,880 annual income range where decrease in receivable GIS is steeper. What could that mean? Here are a couple of my hypothesis:

Most receivers of GIS receive additional income around that range, or above $2,040. For example the totals of CPP, employer income, or other side-income. This steeper slope applied at this specific range could serve budgeting purposes.

A strategy to cap the maximum annual income to $18,624 (listed as of Q4 2020). If the -0.5 slope was applied to the entire line, the maximum annual income would actually be around $22,000. However, the range of $2,040 and $8,880 is not explained with this hypothesis.

First Hurdle Solution: Calculations won’t do

It became apparent to me that it would be futile to create a algorithmic representation of a step-function to simulate the tabular behaviour provided in the Gov. website.

These tables could be updated without warning, which may mean re-jigging the step-function formulae every time — perhaps on a quarterly basis — adding to maintenance and inaccuracy problems.

The best solution would be to cache the tabular data on disk, and create a look-up function to fetch needed data. It would yield much more accurate results, and require less maintenance. The only maintenance would be having to crawl through the tables and cache the results on a quarterly basis — something easily done by triggering a script that creates a JSON file.

It is not a pretty solution though. It does make me wonder what kind of formula the Government uses internally to generate these tables. I hope its not manual.

Step 3: Partial OAS and the concept of a Standard Income Level

The plot deepens as the concept of a Partial OAS is introduced. Specifically, it is with the introduction of the concept of a “Standard Income Level”. A term I’m coining for the lack of another.

It is the minimum amount that a senior should receive per month in order to live with a certain comfort. This amount is a constant predetermined by the Government and updated periodically. Its essentially the following:

where the “Maximum receivable GIS” is the amount assuming zero other income

This means that for Full OAS receivers, they will at the very least receive the Standard Income Level, and no less.

For Partial OAS receives on the other hand, in order for this expression to hold as their receivable OAS amount is lower, their receivable GIS must increase. Essentially, GIS will make-up for the lesser amount of OAS up until the expression produces the constant of Standard Income Level.

Its actually a nice standard that guarantees seniors won’t be in need just because they have not lived the majority of their lives in Canada, which is the case for many immigrants.

The Standard Income Level is different for seniors in different conditions. For example, a single senior may have a higher Standard Income Level compared to a senior with a spouse that also receives OAS. This is because it is assumed that a senior living with a spouse may share certain expenses.

Second Hurdle: GIS as a function of many things

With seniors whom receive Partial OAS, their receivable GIS is no longer a function of their Annual Income alone. It depends on more things:

Annual Income

Receivable OAS amount (the partial OAS)

Standard Income Level (depends on their condition)

On a high-level, this means that the maximum receivable GIS for a full-OAS receiver is less than the maximum receivable GIS for a partial-OAS receiver. Therefore, none of the tables in the Gov. websites apply to the case of partial-OAS receivers.

Assuming that the rate of GIS decrease vs. the annual income ranges still hold, I could still calculate the delta of GIS decrease across income ranges, and subtract that value against the higher receivable GIS of a partial OAS recipient.

Where the “GIS limit” would be the maximum GIS one can receive.

Where the “reducible amount” is derived from the lookup tables according to annual income.

This complicates the calculation for receivable GIS into a territory that cannot be confirmed is true since the official sources does not have any published data on the mater.

I went with my assumptions above with the understanding that it may be inaccurate with a tolerance of perhaps a few hundred dollars from mark in the cases for Partial OAS receivers.

Step 4: Applying rules for Single and Coupled situations

There are variations on Standard Income Level, and Annual Income limit for GIS eligibility with regards to the living situation of the individual. Depending on whether the individual is single, widowed, coupled, etc.

Luckily the tables from the official website varied very little between each situation (with the exception of the Allowance condition, something I have not implemented in my calculator).

I was able to use the same crawler script with minimal modification to cache the tables. The same functions for calculating OAS and GIS also applied as long as the correct constants and variables were provided.

Observation

For coupled individuals, the Annual Income is the household’s and not the individual’s. Consequently, the receivable GIS amounts are evenly split between the couple.

Conclusion & Parting Thoughts

The calculator is 100% accurate when looking up OAS/GIS amounts for Full OAS recipients. However, it is not as accurate for Partial OAS recipients, and I don’t know precisely by how much although I gess-etimate a $100 or so tolerance based on my own data.

This is mainly because the official sources are not transparent around how GIS for Partial OAS receivers are calculated. The official website prompts you to contact Old Age Security instead, which in my experience can be a hassle involving your standard postage snail-mail.

I would be interested in knowing how GIS amounts for Partial OAS recipients is calculated. Generally, I see no reason to not having the formulas publicly accessible instead of hundreds of pages of look-up tables.

Overall, I believe there is plenty of room to make the official resources easier to navigate. Something that would be important considering their target audience are seniors that are not the most tech-savvy generation.

References