Library · Trading · Published 9/30/2026
Moving averages
A moving average blends recent closing prices into a steadier line, but it always lags and says nothing about tomorrow.
In short
I once watched a neighbor check the price of a stock nine times before lunch, and by supper he was more tired than his price chart was. If you have ever felt that same jumpiness, a moving average may be the calmer view you were hoping for. It takes the last several closing prices and blends them into one steady line. You pick how many days it looks back, and a short window follows the price closely while a long window moves slowly. It shows where a price has been, and it says nothing sure about where the price will go. Every calculation on this page uses plain figures you can check with a pencil. Nothing here tells you to buy, sell, or hold anything.
The whole of it
What it is
A friend of mine who farms used to say he trusted the season more than the day. One cold morning never told him the weather was turning. A whole week of cold did. A moving average works on that same idea. You take the closing price of a stock or fund over a set number of days, add those prices up, and divide by the number of days. Then tomorrow you drop the oldest day, add the newest, and do it again. The average moves along with the market, which is why it carries the name it does.
There are two common kinds. A simple moving average gives every day in the window the same weight. An exponential moving average gives more weight to recent days, so it reacts faster to fresh news. Neither is smarter than the other. They are just two ways of smoothing out the bumps, and each one has a job it does well and a job it does poorly.
You might wonder why anyone bothers. A daily price chart is jagged. It jumps up and down for reasons that may have nothing to do with the real worth of the business. A moving average sands those jumps down so the drift underneath is easier for your eye to follow. That is all it does. It is a lens, not a crystal ball.
How it works
If you are holding a chart with a line running through it, you are looking at one price per day, joined up. The moving average adds a second line drawn from the averages you calculate. Where the price sits above the line, recent prices are higher than the past average. Where it sits below, they are lower.
Traders often watch two averages at once, one short and one long. When the short one climbs above the long one, some people read that as a sign of rising momentum. They call it a golden cross. When the short one drops below the long one, they call it a death cross. These are labels people use, and they describe what already happened. They do not promise what comes next.
Here is the part that trips people up. An average is always late. Because it is built from old prices, it can only confirm a move after the move has started. A longer window smooths more but lags more. A shorter window lags less but jiggles more. You are trading one problem for the other, and no setting removes both. That is the honest cost of the tool.
The numbers, and where to find yours
The numbers you choose here are your own, not the law's. The window is up to you. Fifty days and two hundred days are popular choices, and you can use ten or thirty or any count that suits you. No government sets these figures, and no rule says one is correct.
You will find the closing prices on your brokerage account, on the site of the exchange where the stock trades, or on any charting page. Most charting tools let you add a moving average with a click and type in the window length. If you want to check the tool against your own work, pull the closing prices yourself and do the arithmetic by hand once. It builds trust in what the screen shows you.
If you trade in a taxable account, your gains and losses have tax rules of their own, and those are separate from the chart. The IRS explains them in Publication 550, called Investment Income and Expenses. A moving average tells you nothing about your tax bill, so keep the two questions apart.
A worked example
Consider a woman named Marisol who follows a fund and wants a five day simple moving average. She writes down five closing prices in dollars: 40, 42, 41, 43, and 44. She adds them up. Forty plus 42 is 82. Add 41 and you get 123. Add 43 and you get 166. Add 44 and you get 210. She divides 210 by 5 and gets 42. So her five day average is 42 dollars.
The next day the fund closes at 46. Marisol drops the oldest price, which was 40, and adds the new one. Her five prices are now 42, 41, 43, 44, and 46. Forty two plus 41 is 83. Add 43 and you get 126. Add 44 and you get 170. Add 46 and you get 216. She divides 216 by 5 and gets 43.2. Her average moved from 42 to 43.2 while the price jumped from 44 to 46.
Look at that gap. The price is at 46 and the average sits at 43.2. The average trails behind, just as we said it would. Marisol now sees the price is above her line. That tells her the recent days ran higher than the last five. It does not tell her tomorrow. Nice work, Marisol. She checked every step and can show it to anyone.
Where it goes wrong
I have seen good people get hurt by a line on a screen, so let me speak plainly here. The first trouble is lag. By the time a crossover appears, much of the move may be over. You can end up reacting to old news and feeling clever about it.
The second trouble is the sideways market. When a price drifts up and down without going anywhere, the price crosses its average again and again. Each crossing looks like a signal, yet none of them lead anywhere. This is often called whipsaw, and it can wear down your patience and your account together.
The third trouble is the fit. It is easy to try many window lengths until one seems to have called the past perfectly. That fit often falls apart on new data, because you tuned it to a story that already ended. Be careful of that. It flatters you, and flattery is a poor guide.
The last trouble is cost. Every trade can carry commissions, spreads, and taxes. A strategy that looks fine on a chart may look different once you subtract what it costs to act on it. Read your broker's fee schedule and the tax rules before you lean on any signal. A moving average is one tool among many, and it works best when you know exactly what it can and cannot do.
Questions to answer before you leave this page
Can you say in your own words what a five day average is made of, and could you rebuild Marisol's 42 and 43.2 with a pencil? Do you know which window length you would choose, and can you explain why you chose it rather than borrowing it from someone else? Have you looked at a chart where the price kept crossing its average in a flat market, and do you see how easily that could mislead you? What would a trade cost you in fees and taxes, and have you subtracted that before trusting any signal? And when the line and your gut disagree, do you know which of the two you would rather learn from?
Related
reading a chart without fooling yourself
recency bias
base rates before stories
backtest hygiene lookahead survivorship overfitting
Ask about this guide
A model reads this page and answers from it. It will say when the answer is not on the page. Education, not personalized advice.
Written by the site's growth engine and checked by its gates: voice, law and ethics, facts, arithmetic, and sources. Not yet read by a human editor; every page carries the correction process. Rules and dollar limits change every year; figures come from the rules table with their source and date.