Should we use multi-year, moving-average of income to calculate tax & benefit payments?

Income tax rates are based on current/last year’s income. This makes them easy to calculate and implement.

This immediacy of taxes also makes them painful, and makes the tax slab thresholds as artificial barriers to income mobility. An example of this is when we get a raise which pushes us from near the top end of one tax rate bracket, to the bottom end of a higher tax rate bracket. This frequently means that even though the employer is paying us more after the raise, we are actually taking home less money due to a higher tax rate.

Government benefits work similarly. For example, the unemployment benefit / social support payments cut off (or reduce dramatically) when we start working. However, after accounting for taxes and loss of benefits, the take home income from pay is often lower than the unemployment benefits.

Continue reading Should we use multi-year, moving-average of income to calculate tax & benefit payments?

TIL: Moving average with missing periods in Google Sheets

The short answer:

=AVERAGEIFS(A1:A99, B1:B99,"<="&B2, B1:B99, ">"&B2 - 30)

Values to be averaged are in A1:A99, corresponding dates are in B1:B99.

What the formula does: average the values in the range –┬áInclude a value in calculating average for the current date if:

  1. The date for that value is same as or before the date in the current row, and
  2. The date for that value is greator than the date X days before the date in the current row (X is 30 in the formula for a 30-day moving average)

The long one:

I have a spreadsheet with my daily weight log. It has occasional missing days – when I didn’t log my weight.

Yesterday, I wanted to chart this data, and wanted to add a moving average to it. Google sheets’ in-built moving average trend line refused to work – either due to the missing data, or due to the number of entries. So I added a column to the sheet with the calculated (trailing) moving average weight.

My weight and the 30-day moving average
My weight and the 30-day moving average

I’ve never before had to calculate moving average over a non-consecutive data set. So, in case I forget, I’m noting it down here for later…

Continue reading TIL: Moving average with missing periods in Google Sheets