Example 1
You are in a 40% tax bracket in 2022 and the subsequent year of withdrawal, which we will assume is 2028.
You want to contribute the after-tax amount of $10,000 of your employment income this year to one of these plans, or both. Assume the contribution doubles by 2028, and then you withdraw the entire amount.
RRSP contribution: If you decide to contribute $10,000 now, you get a $10,000 deduction so there is no tax on that amount for 2022. This means you can contribute the entire amount of $10,000. The $10,000 grows to $20,000 by 2028, and when you withdraw, you pay $8,000 in tax (40% rate), leaving you with $12,000 after tax.
TFSA contribution: There is no deduction in 2022, so your after-tax amount of employment income is $6,000 ($10,000 net of the 40% tax in 2022). So you can contribute $6,000. That doubles to $12,000 by 2028 when you withdraw, with no tax, leaving you with $12,000.
So you are left in the same after-tax position either way.