EDUCBA Logo

EDUCBA

MENUMENU
  • Explore
    • EDUCBA Pro
    • PRO Bundles
    • Featured Skills
    • New & Trending
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign Up
Home Finance Finance Resources Finance Formula Moving Average Formula
 

Moving Average Formula

Madhuri Thakur
Article byMadhuri Thakur

Updated July 25, 2023

Moving Average Formula.

 

 

Moving Average Formula (Table of Contents)
  • Formula
  • Examples

What is the Moving Average Formula?

The term “moving average” refers to the technical analysis technique that smoothens the fluctuation observed in the data in order to draw insights about any available trend or pattern in the data.

The data pattern is then used as an indicator for estimating the future. The moving average can be primarily of three types:

Watch our Demo Courses and Videos

Valuation, Hadoop, Excel, Mobile Apps, Web Development & many more.

  1. Simple Moving Average
  2. Weighted Moving Average
  3. Exponential Moving Average

The formula for simple moving average at any point in time can be derived simply calculating the average of a certain number of periods upto that point in time. For instance, the 5-day simple moving average of stock price means the average of the stock price of the last five days. Mathematically, it is represented as,

Simple Moving Average = (A1 + A2 + …… + An) / n

where Ai is the data point in the ith period

The formula for the weighted moving average uses different weightage for data points from different periods. Typically, the weightage decreases with each data point from previous periods. Mathematically, it is represented as,

Weightage Moving Average = (A1*W1 + A2*W2 + …… + An*Wn)

where Ai and Wi are the data point in the ith period and its weightage respectively

The formula for exponential moving average assigns higher weightage to the current data point by using a multiplying factor. Mathematically, it is represented as,

Exponential Moving Average = (C – P) * (2 / (n + 1)) + P

where C and P are current data point and an exponential moving average of the previous period (simple average used for the first period) respectively

Examples of Moving Average Formula (With Excel Template)

Let’s take an example to understand the calculation of Moving Average Formula in a better manner.

You can download this Moving Average Formula Excel Template here – Moving Average Formula Excel Template

Moving Average Formula – Example #1

Let us take the example of the stock price of a company to explain the concept of moving average. The stock prices for the last 12 days are as follows:

 Example of The Stock Price of A Company -1.1

Predict the stock price on the 13th day using 4- day simple moving average.

Solution:

Moving Average is calculated using the formula given below

Simple Moving Average = (A1 + A2 + …… + An) / n

Moving Average Formula-1.2

Based on a 4-day simple moving average the stock price is expected to be $31.68 on the 13th day.

Moving Average Formula – Example #2

Let us take the above example to predict the stock price on the 13th day using 4- day weighted moving average such that most recent to last weightages are 0.50, 0.30, 0.15 and 0.05.

 Example of The Stock Price of A Company-2.1

Solution:

Moving Average is calculated using the formula given below

Weightage Moving Average = (A1*W1 + A2*W2 + …… + An*Wn)

Weightage Formula -2.2

Based on a 4-day weighted moving average the stock price is expected to be $31.73 on the 13th day.

Moving Average Formula – Example #3

Let us take the above example to predict the stock price on the 13th day using a 4-day exponential moving average.

 Example of The Stock Price of A Company-3.1

Multiplying Factor = 2 / (4 + 1) = 0.4

Solution:

Moving Average is calculated using the formula given below

Exponential Moving Average = (C – P) * 2 / (n + 1) + P

Exponential Formula-3.2

Based on a 4-day exponential moving average the stock price is expected to be $31.50 on the 13th day.

Explanation

The formula for simple moving average can be derived by using the following steps:

Step 1: Firstly, decide on the number of the period for the moving average, such as 2-day moving average, 5-day moving average, etc.

Step 2: Next, simply add the selected number of consecutive data points and divide by the number of periods. Repeat the exercise to arrive at a set of averages.

Simple Moving Average = (A1 + A2 + …… + An) / n

The formula for the weighted moving average can be derived by using the following steps:

Step 1: Firstly, decide on the weightage to be assigned to the data point of each period.

Step 2: Next, add the products of the data points and their respective weightage. Repeat the exercise to arrive at a set of averages.

Weightage Moving Average = (A1*W1 + A2*W2 + …… + An*Wn)

The formula for exponential moving average can be derived by using the following steps:

Step 1: Firstly, decide on the number of the period for the moving average. Then calculate the multiplying factor based on the number of periods i.e. 2 / (n + 1).

Step 2: Next, deduct the exponential moving average of the previous period from the current data point and then multiplied by the factor. Then add back the exponential moving average of the previous period. Repeat the exercise to arrive at a set of averages.

Exponential Moving Average = (C – P) * 2 / (n + 1) + P

Relevance and Use of Moving Average Formula

It is crucial to understand the concept of moving averages as it provides important trading signals. An increasing moving average indicates that the security is exhibiting uptrend and vice versa. Further, a bullish crossover indicates an upward momentum that occurs when a short-term moving average crosses above a long-term moving average. On the other hand, a bearish crossover indicates a downward momentum that occurs when a short-term moving average crosses below a long-term moving average. All these indicators are used in predicting the movement of securities in the future.

Recommended Articles

This is a guide to Moving Average Formula. Here we discuss how to calculate Moving Average Formula along with practical examples. We also provide a downloadable excel template. You may also look at the following articles to learn more –

  1. Formula for Portfolio Return
  2. How to calculate Relative Standard Deviation Formula
  3. Example of Covariance Formula
  4. Calculation of Relative Standard Deviation

Primary Sidebar

Footer

Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

© 2025 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Investment Banking Course

Corporate Valuation, Investment Banking, Accounting, CFA Calculator & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA

Download Moving Average Formula Excel Template

EDUCBA Login

Forgot Password?

EDUCBA

डाउनलोड Moving Average Formula Excel Template

🚀 Limited Time Offer! - 🎁 ENROLL NOW