Heads Up: The Fed continues to raise rates — up 3% this year — making credit card debt even costlier.
Pay it off today with a low fixed-rate personal loan. View your rate —>

Simple Moving Average (SMA): Definition & How to Use It

By Austin Kilham · December 18, 2021 · 6 minute read

We’re here to help! First and foremost, SoFi Learn strives to be a beneficial resource to you as you navigate your financial journey. Read more We develop content that covers a variety of financial topics. Sometimes, that content may include information about products, features, or services that SoFi does not provide. We aim to break down complicated concepts, loop you in on the latest trends, and keep you up-to-date on the stuff you can use to help get your money right. Read less

Simple Moving Average (SMA): Definition & How to Use It

Simple moving averages are one of the indicators that investors use in technical analysis to help them choose stocks. They’re the average of a range of prices of a stock over a given time period.

Here’s a closer look at how to calculate simple moving averages, what they represent, and how to use the information they provide.

What is Simple Moving Average (SMA)?

A simple moving average is the average price of a stock, often its closing price, over a specific period of time. It’s called “moving” because stock prices always change. As a result, charts that track SMA move forward as each new data point is plotted. Investors use simple moving averages and other technical indicators to help them get an idea of the direction a stock price is moving based on previous prices.

While simple moving averages can give investors an idea of what could happen in the future, they have limitations. That’s because simple moving averages reflect past data, so they only represent past trends.

Formula for Simple Moving Average

To calculate a simple moving average, Investors take the average closing price of a financial security and divide it by a set number of periods.

The formulas is as follows:

SMA = (P1 + P2 + P3…+ Pn)/n

Where P is price and n is the number of periods.

Let’s take a look at an example of stock price over a period of 10 days.

Day (n)

Closing price (P)

1 $40
2 $42
3 $47
4 $51
5 $46
6 $44
7 $40
8 $38
9 $37
10 $36

To arrive at the simple moving average we first total the closing prices and divide by the number of periods.

SMA = (40 + 42 + 47 + 51 + 46 + 44 + 40 + 38 + 37 + 36)/10 = 421/10 = $42.10

On day 11 if an investor wants to continue looking at a 10-day average, they would drop the first data point in the list above and add the closing price from the eleventh day, shifting the moving average forward by one data point. They would continue to do this for each subsequent day, and in this way, the average continues to move.

What Does SMA Show You?

Analysts often plot simple moving averages as a line on a chart of individual data points. The line helps smooth out movement, making it easier to identify trends. If the line representing the SMA is moving up, then the price of the stock is trending up. Conversely, if the SMA is moving down, prices are also trending downward.

For long-term trends investors typically look at SMA over 200 days, while intermediate trends may focus on a 50-day period. Short-term trends typically use fewer than 50 data points.

Longer-term SMAs can help smooth out stock volatility, but they also have the biggest lag when compared to current prices.

What Are Crossover Signals?

Investors may chart two SMAs — one relatively short and the other long — to generate crossover signals, points when the lines cross, which can help identify moments to buy or sell a stock.

When the shorter moving average crosses above the longer moving average, it is known as a “golden cross.” This is a bullish signal that tells investors that stock prices are trending in the upward direction. On the other hand, a bearish “death cross” occurs when the shorter moving average crosses below the longer moving average. This is a signal that prices are trending down.

What Are Price Crossovers?

Price crossovers are another signal investors may generate to help them identify moments to buy and sell. When a stock’s prices crosses over the moving average, it generates a bullish signal, and it generates a bearish signal when stock prices crosses under the moving average.

One Step Behind

Though analysts use SMAs to identify trend, they are still lagging indicators. SMAs reflect events that have already taken place, making it a “trend following” metric. In other words, they’ll always be a step behind what is happening in real time. As a result, SMAs do not predict future prices, but they can provide investors with some insight into where prices may be going.

SMA vs Other Moving Averages

There are other moving averages investors may use when performing technical analysis on a stock. These help investors flesh out recent trends in stock price movement, but they also tend to be a bit more complicated to calculate.

SMA vs Weighted Moving Average

Like SMAs, weighted moving averages (WMAs) help establish the direction in which a stock price is likely moving. However, they put more emphasis on recent prices than SMAs.

Investors calculate a WMA by multiplying each data point by a weighting factor. That gives more weight to recent data and less weight to data farther in the past. The sum of the weighting must add up to 1, or 100%. Simple moving averages, on the other hand, assign an equal weight to each data point.

The formula for WMAs is:

WMA = Price1 x n + Price2 x (n-1) +…Pricen/[n x (n+1)]/2

Where n is the time period.

SMA vs Exponential Moving Average

An exponential moving average (EMA) also gives more weight to more recent prices. However, unlike WMAs, the rate increase between one price and the next is not consistent — it is exponential. Analysts typically use EMAs over a shorter period of time, making them more sensitive to price movements than SMAs are.

The formula for EMA is:

EMA = K x (Current Price – Previous EMA) + Previous EMA


K = 2/(n+1)

n = The selected time period.

For first-time EMA calculations, previous EMA is equal to SMA, an average of all prices over a number of periods, “n”.

Which Moving Average Is Better?

Each moving average has its own place in an investor’s tool belt. Investors may use WMAs and EMAs — which emphasize recent data — if they are worried that lags in data will reduce responsiveness. Some investors believe that the exponential weight given by EMAs makes them a better indicator of price trends than WMAs and SMAs.

Some more complicated indicators require a simple moving average as one input for calculations.

The Takeaway

If you’re just starting out as an investor, it can be hard to know which stocks to buy and when to buy them. Technical analysis strategies, such as moving averages, can help narrow your search and clue you in to potentially advantageous times to buy or sell.

Once you’re ready to start trading stocks a great way to build your portfolio is by opening an investment account on the SoFi Invest® brokerage platform. SoFi Active investing allows you to trade or invest in stocks without commission.

Photo credit: iStock/SrdjanPav

SoFi Invest®
The information provided is not meant to provide investment or financial advice. Also, past performance is no guarantee of future results.
Investment decisions should be based on an individual’s specific financial needs, goals, and risk profile. SoFi can’t guarantee future financial performance. Advisory services offered through SoFi Wealth, LLC. SoFi Securities, LLC, member FINRA / SIPC . SoFi Invest refers to the three investment and trading platforms operated by Social Finance, Inc. and its affiliates (described below). Individual customer accounts may be subject to the terms applicable to one or more of the platforms below.
1) Automated Investing—The Automated Investing platform is owned by SoFi Wealth LLC, an SEC registered investment advisor (“Sofi Wealth“). Brokerage services are provided to SoFi Wealth LLC by SoFi Securities LLC, an affiliated SEC registered broker dealer and member FINRA/SIPC, (“Sofi Securities).
2) Active Investing—The Active Investing platform is owned by SoFi Securities LLC. Clearing and custody of all securities are provided by APEX Clearing Corporation.
3) Cryptocurrency is offered by SoFi Digital Assets, LLC, a FinCEN registered Money Service Business.
For additional disclosures related to the SoFi Invest platforms described above, including state licensure of Sofi Digital Assets, LLC, please visit www.sofi.com/legal. Neither the Investment Advisor Representatives of SoFi Wealth, nor the Registered Representatives of SoFi Securities are compensated for the sale of any product or service sold through any SoFi Invest platform. Information related to lending products contained herein should not be construed as an offer or prequalification for any loan product offered by SoFi Bank, N.A.

All your finances.
All in one app.

SoFi QR code, Download now, scan this with your phone’s camera

All your finances.
All in one app.

App Store rating

SoFi iOS App, Download on the App Store
SoFi Android App, Get it on Google Play

TLS 1.2 Encrypted
Equal Housing Lender