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

By Austin Kilham. August 17, 2023 · 6 minute read

This content may include information about products, features, and/or services that SoFi does not provide and is intended to be educational in nature.

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 the prices of a stock over a given time period.

Here’s 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 a sense 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.


💡 Quick Tip: Look for an online brokerage with low trading commissions as well as no account minimum. Higher fees can cut into investment returns over time.

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

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, 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 trends, 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.


💡 Quick Tip: Are self-directed brokerage accounts cost efficient? They can be, because they offer the convenience of being able to buy stocks online without using a traditional full-service broker (and the typical broker fees).

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.

Ready to invest in your goals? It’s easy to get started when you open an investment account with SoFi Invest. You can invest in stocks, exchange-traded funds (ETFs), mutual funds, alternative funds, and more. SoFi doesn’t charge commissions, but other fees apply (full fee disclosure here).


Invest with as little as $5 with a SoFi Active Investing account.


Photo credit: iStock/SrdjanPav

Third-Party Brand Mentions: No brands, products, or companies mentioned are affiliated with SoFi, nor do they endorse or sponsor this article. Third-party trademarks referenced herein are property of their respective owners.

Financial Tips & Strategies: The tips provided on this website are of a general nature and do not take into account your specific objectives, financial situation, and needs. You should always consider their appropriateness given your own circumstances.

SoFi Invest®

INVESTMENTS ARE NOT FDIC INSURED • ARE NOT BANK GUARANTEED • MAY LOSE VALUE

SoFi Invest encompasses two distinct companies, with various products and services offered to investors as described below: Individual customer accounts may be subject to the terms applicable to one or more of these platforms.
1) Automated Investing and advisory services are provided by SoFi Wealth LLC, an SEC-registered investment adviser (“SoFi Wealth“). Brokerage services are provided to SoFi Wealth LLC by SoFi Securities LLC.
2) Active Investing and brokerage services are provided by SoFi Securities LLC, Member FINRA (www.finra.org)/SIPC(www.sipc.org). Clearing and custody of all securities are provided by APEX Clearing Corporation.
For additional disclosures related to the SoFi Invest platforms described above please visit 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.

SOIN0823020

TLS 1.2 Encrypted
Equal Housing Lender