# What is the optimal number of months to base my “average spending” on?

My goal is to determine how much money I spend on groceries per month, "on average". I have a list of all my food shopping orders (timestamp + amount in USD).

Currently, I do the `sum()` of all orders made within the last three months (that is, with their timestamp being "less than 3 months" from now, meaning whenever I check this value), and divide this by 3 to get the "average per month".

It seems like a good way, but why shouldn't I just do 6 months and divide by 6? Or every month ever recorded divided by however many months that time span represents? Why did I pick 3 months specifically? Am I getting a skewed value?

My internal reasoning is: "the last three months are the most relevant because earlier than that, I might have had a different pattern of shopping" and "I'm worried that I might get the calculations wrong if I make it based on 'all time'".

Is there a general rule for this? Is 3 months (a quarter of a year) too little or just right? Maybe even too much? Should it perhaps be based on only the two last months?

At risk of making this "too broad", I also wonder if there is a general rule for this, even outside of just grocery shopping specifically.

• Depends on the 3 months. If these were November, December and January you might have much higher expenses than in other three-months-periods because of christmas. – Bernhard Döbler Jun 18 '20 at 10:22
• Very few expenses will vary on a cycle longer than 12 months. For example, my home is heated using natural gas; my gas bill varies from \$20/month in the summer to \$300-500 in the winter (depending on the temperatures), but I don't expect any significant differences from year to year (barring rate changes). – chepner Jun 18 '20 at 12:43
• Which is to say: you might get a more accurate view of your spending using more than 3 months, but anything over 12 months is unlikely to give you any new information. – chepner Jun 18 '20 at 12:47
• Why don't you do all three? That way you'll get long and short trend data. – JS Lavertu Jun 18 '20 at 13:47

You might be overthinking this... There is no right or wrong answer.

In my opinion, the more data the better. If you're only looking at the past three months, you might be missing seasonal shopping patterns or items that you don't replace as often.

Why don't you run the numbers for 3 months, 6 months, a year, all the data you have... to see if there's a material difference? You could always go with the most conservative figure.

At the end of the day, it's a rough estimate for your budget and will never match to the dollar. The bigger question is how it compares to your income and other expenditures.

• Yeah, if the raw data is already there, why not extract all potentially helpful information – Hobbamok Jun 18 '20 at 16:04
• You should let the data tell you when something is important or not, It's really important to use some mathematic tool like ARIMA - see my post below. – Marcus D Jun 20 '20 at 9:39

You have a tradeoff between timeliness (which favors using recent data) and precision (which favors using longer-term data to average out fluctuations). A reasonable approach is to average over a period that reflects known regular fluctuations. For example, if you have significant seasonal variations in spending, or any bills that come annually, then 12 months would be preferable. Or for groceries, if you shop regularly say every 2 weeks, make your interval a multiple of that. Since 3 months is 13 weeks, it would not accord with this; it would randomly include either 6 or 7 shopping trips, so you could expect to be off your true average by at least 8%.

The other answers have suggested, correctly, that there is no correct answer to this.

If your timeline is too short you may miss rare events (eg: once or twice a year you have a major event and you spend \$1,000 on caviar and champagne). If you average every three months you may get a far higher or far lower average depending on whether such a rare event occurred in that time frame or not.

If your timeline is too long you may miss out on changes in your habitual expenditure. For example, last year you had food delivered every evening and bought \$10 coffees twice a day, this year you decided to get a handle on your spending and cut out those excesses. Should the old habits still be measured? Perhaps. That depends on if you are likely to relapse now and again. There's no point in measuring only the good times and ignoring the bad.

If you want to approach this a bit more scientifically you should plot your expenses on a graph for as much data as you have. If the chart is basically flat then a monthly average is fine, if (as is likely) it varies a bit seasonally then an annual average might be better. If you see your spending was higher a year ago and you think you have developed new habits that you will stick to then perhaps it is best to exclude the period with the data you think is no longer relevant.

For the very best answer, you need years of data.

You would plot graphs of spend by month, comparing year to year to find the pattern in the months. They're likely to have similar shape year to year, but the amounts will move up or down with life events.

When you find a shift, you'd want to look into what the reason was, was it a pay rise? Or you had a child?

Once you have a a good idea of your spending over time, and the life events which caused it to shift, you can begin to predict how much you might want to allocate when the next major event is approaching, or ways you can avoid spending creep when your income might go up.

For most people this will be overkill, for some people, they'll want to build a machine learning model to use, how ever you want to handle it is fine.

Another insight you might find useful is to compare how your current `x`-month average measures up to the same period last year.

As several people have pointed out, your expenses may vary throughout the year, but may tend to fluctuate on an annual basis (e.g. more discretionary spending around holidays, increased electricity cost in Summer, etc.). For this reason, it may be useful to see how your current monthly/3-month/6-month/12-month average compares with the same time period last year.

``````Average Monthly Spending
================================================
Time Period:    Last 3 months
------------------------------------------------
2019 → \$2521.59/mo
2020 → \$2819.06/mo (+\$297.47/mo)

``````

I disagree with most posters on this, as there is a reasonable number of months to look back upon. You need to do some analysis of the data to determine this.

Approaching this from a time series analysis point of view, after collecting a few years of data, then you could perform an ARIMA analysis, which will show three main aspects (see the link above for a description of the below aspects)

• AR - Auto Regressive
• I - Integrative
• MA - Moving Average

The ARIMA modelling technique is built within Excel will allow you to engage with your data.

Edit: As has been pointed out, the ARIMA modelling is an Excel add-in and needs some reading of the 'how to' link pasted above, plus some engagement with the maths of it, so perhaps isn't for the faint hearted.

• This is a plug-in to Excel, not something that is automatically available. It is probably too high a level of analysis for the casual user. – Dragonel Jun 18 '20 at 18:40
• Possibly so, I'll amend my answer with that in mind. – Marcus D Jun 20 '20 at 11:25

Without knowing more about your spending patterns and what you're trying to accomplish, there's no one right answer. Are you trying to capture your "normal" spending that happens each month, or amortize infrequent large expenses over a longer average? You could explore your data to see if there is a major impact by averaging over the last 3, 6, or 12 months.

Most people will have spending patterns that repeat annually. Things like spending on summer vacation, Christmas shopping, home heating bills in the winter, tax bills, bi-annual car insurance payments, and so on are things that might be missed if you pick a months-long window to average over. If you do pick a short window that happens to include these large, infrequent expenses, you might find that your average comes out higher than you expect, since it's not an accurate representation of expenses that you incur each month.

I'd say average over as long a period as possible, in which you are confident that your spending habits have remained relatively stable. It wouldn't make much sense to average over several years if you've moved from place to place and held different jobs with different levels of disposable income, but if you've lived in the same place without much change in your financial situation, a years-long interval will give you a number that more truly represents your "average" spending over the time period. The longer the time period, the more closely your total expenditure will match your average expenditure times the time interval.

Rather than thinking about months, think in terms of type expenditures.

Some expenditures will be fixed. For example, a monthly gym membership will be \$X. So, you only need 1 month for an average (unless the price goes up).

Others will be variable. These include electricity, heating, and groceries. So, for your variables, it's better to just start tracking them over time and then expenditures will converge to an average number or spending velocity. If you take only a few months your numbers could be way off. For example, if I track heating expense during the summer for 3 months I would find I spend \$20 a month. Then I budget for that. Oops, now winter comes and its \$200 per month, so more data would be required to get an accurate average. Food spending may fluctuate as well.

So, just start tracking your monthly spend and you should start to see spending patterns emerge.

There have been a lot of good answers here but they don't generally address the higher level idea from the statistical sense: You want your data to be a representative sample from the distribution (of, say, weekly spending or spend per grocery trip) that you're trying to ascertain over the time period you're interested in. You can then use that distribution to get a very good idea of your average spending and how it varies. You can even inspect the data points in the tails and see if they occur around certain times of year (e.g. the holiday season).

By adopting a statistical stance (i.e. thinking about the distribution, the mean, and the variance and/or standard deviation) you can start to bring in insights in a more structured way. For example, you might consider how life events can change this distribution. Specifically, if you were to lose your job and tighten the purse strings or get a large pay raise and decide you can finally realize your dream of being 'sliced mango rich' á la Ali Wong, it's safe to assume that the distribution will change. While that is largely common sense, what may be less obvious is that those life moments are good potential cutoffs where you can view samples before that life event as not being representative of your new reality (i.e. the new distribution).

Further, you can also consider other types of expenditures and some of their characteristics. For example, groceries will tend to have fairly high variation, some outliers, and a (potentially variable) high frequency of occurrence. In contrast, insurance and mortgage payments, rent, etc. tend to have low variation, be relatively stable, and have a regular frequency. Therefore, the number of examples you need to fully characterize the distribution of these kinds of payments is less that it would be for your groceries – in fact, you may not even need to adopt a statistical perspective. You can just look at the payment schedule for your mortgage, your rent contract, or the past few insurance payments and get a very precise idea of how much you'll be paying in the future provided you don't move, refinance your home, or have a car accident. In effect, you can use a first principles based approach rather than a statistical approach.

In general, anywhere where you are not mandated to pay on a schedule (e.g. groceries, entertainment, travel, or most anything that's not a bill) the answer you're looking for can be provided using statistical tools. If have a little gumption and have taken a statistics course before, you'll likely have everything you need to get high quality estimates while being able to identify where they might break down (although, in most cases, the breaking down will best be viewed through the lens of common sense as mentioned above).

I think that there is an important significant element here that needs to be addressed: this particular three months are probably a poor comparison, due to the combination of the significant change in habits due to presumably staying at home more often (if not entirely), and the significant increase in food and similar prices over the last couple of months - in the range of 3 to 5% year-over-year (and could be much more depending on what you buy; meat and egg heavy diets likely are up more like 7-10%).

As such, you probably would want to write 2020-2021 off as outliers - hoping this goes back to the old normal by 2022 - and, while paying attention to the "now" values, don't assume any older values are relevant, nor that these values are relevant in 2022 or beyond; we just don't know how things will compare.