I cannot look at the FIRECalc's code, nor can I read it. I can look at the code in the Retire Early Safe Withdrawal Calculator and I can understand it. It is in an Excel spreadsheet.
Here is what happens:
1) Row 190 has the inflation index numbers. The ratio of two adjacent years equals (1+inflation).
2) Row 180 calculates [the TIPS interest rate*(1+inflation)+inflation]. That is, it multiplies the number in cell H8 (written as $H$8 ) and the ratio of two index numbers in row 190 and adds the inflation rate. The code looks awkward at this point. Inflation equals the ratio minus 1. In the first part, the code calculates [1+(the ratio-1)]. The number in cell H8 is a percentage. In the second part, the code converts the inflation to a percentage. It takes the ratio, subtracts 1 and then multiplies by 100%.
3) Row 183 has the interest rate of the fixed income component. It is the same as row 180 when TIPS is selected.
4) Reported balances are those for December 31st. It is at the bottom row for a specified sequence. The January 1st balance of the following year is the identical. It appears in the next column. It is at the top row of the same sequence.
5) The first withdrawal is calculated from the calculator inputs. With FIRECalc, you would enter the dollar amount. With the Retire Early Safe Withdrawal Calculator, it multiplies the withdrawal rate by the initial balance. [And it allocates the withdrawal into two parts according to the user specified input. One part is applied at the beginning of a year and the other at the end, after all portfolio gains and losses for that year.]
6) The first withdrawal has no adjustment for inflation from December 31st of the first year to January 1st of the following year. The withdrawal amount is multiplied by ratio of the index numbers found in row 190 in subsequent years, but not in the first year.
7) The TIPS interest rate includes an inflation adjustment from the first year to the second. That is, it does not know about January 1st or December 31st. It only knows about the inflation index numbers.
For example, in the 1871 sequence, the inflation rate for 1872 is 1.53% (as seen in row 187). With 2% interest, the TIPS interest for 1872 is 3.56% as seen in row 180 (and in row 183 if TIPS has been selected). The TIPS interest for 1872 is 3.56% times the (TIPS) bond balance on January 1st, after the first withdrawal and after allocating the balance between stocks and bonds. The withdrawal amount for 1872 is calculated based on the initial balance, which is the December 31, 1871 balance. It is also the January 1, 1872 balance. If you withdraw the TIPS interest rate, you withdraw 2%, not 3.56%. [It is then applied in two parts, one in January and the other in December.]
I think that FIRECalc treats TIPS the same. [However, it does not break withdrawals into two parts.]
Have fun.
John R.