Skip to main content
Calkulon
Back to Guides
7 min read5 Steps

How to Calculate Moving Averages Manually: SMA, EMA, and WMA

Learn to calculate Simple, Exponential, and Weighted Moving Averages step-by-step. Understand the formulas, see examples, and avoid common pitfalls.

Skip the math — use the calculator

Step-by-Step Instructions

1

Gather Your Data and Define the Period (N)

First, identify the sequence of numbers (e.g., daily prices, sales figures) you want to analyze. Then, decide on the 'period' (N) for your moving average. This is how many data points you'll include in each average calculation. A shorter N makes the average more responsive to recent changes, while a longer N creates a smoother line, highlighting longer-term trends. For our examples, we'll use N=3.

2

Calculate the Simple Moving Average (SMA)

To find the SMA for any given point, sum up the current data point and the (N-1) preceding data points. Then, divide this sum by N. Repeat this process, moving your 'window' of N data points forward one period at a time, to calculate the SMA for each subsequent point. The first SMA will be for the Nth data point in your series.

3

Calculate the Weighted Moving Average (WMA)

For the WMA, you'll assign weights to each data point within your N-period window. Typically, the most recent data point gets the highest weight, and the oldest gets the lowest. Multiply each data point by its assigned weight, sum these weighted values, and then divide by the sum of all the weights. Like SMA, you'll shift this window forward for each new WMA value.

4

Calculate the Exponential Moving Average (EMA)

The EMA is a bit more involved as it's an iterative calculation. First, calculate the 'Multiplier' using the formula: `2 / (N + 1)`. For your very first EMA in the series, you'll typically use the SMA for that same N-period. Then, for every subsequent EMA, use the formula: `(Current Price - Previous EMA) * Multiplier + Previous EMA`. This means each EMA depends on the one before it.

5

Interpret Your Results and Avoid Pitfalls

Once you've calculated your moving averages, observe how they interact with your raw data. Are they trending upwards or downwards? Is the current price above or below the moving average? Remember to double-check your arithmetic, especially with rounding, and ensure you're using the correct N and weights consistently. While manual calculation builds understanding, consider using an online calculator for efficiency with larger datasets.

Hello there! Moving averages are incredibly useful tools for understanding trends in data, whether you're tracking stock prices, sales figures, or even your daily steps. They help smooth out 'noise' and show the underlying direction things are heading. While online calculators are super handy for quick results, knowing how to calculate them by hand gives you a deeper understanding of what's happening behind the scenes. Let's dive in and master Simple, Weighted, and Exponential Moving Averages!

What Are Moving Averages?

Imagine you have a series of numbers, like daily stock prices. A moving average takes the average of a specific number of those data points over a set period, and then 'moves' that window forward, recalculating the average each time. This creates a line that helps visualize trends more clearly.

Prerequisites

All you need is a basic understanding of addition, subtraction, multiplication, and division. A calculator for the actual arithmetic might be helpful, but we'll show you the steps for each part!

1. Simple Moving Average (SMA)

The SMA is the easiest to understand. It's just the average of the data points over a specified period.

Formula:

SMA = (Sum of prices over N periods) / N

Where 'N' is the number of periods you're averaging.

Worked Example: Calculating SMA

Let's use a sample data series of daily closing prices:

  • Day 1: $10
  • Day 2: $12
  • Day 3: $11
  • Day 4: $13
  • Day 5: $14
  • Day 6: $12
  • Day 7: $15

We'll calculate a 3-period SMA.

  • For Day 3: (Price Day 1 + Price Day 2 + Price Day 3) / 3
    • ($10 + $12 + $11) / 3 = $33 / 3 = $11
  • For Day 4: (Price Day 2 + Price Day 3 + Price Day 4) / 3
    • ($12 + $11 + $13) / 3 = $36 / 3 = $12
  • For Day 5: (Price Day 3 + Price Day 4 + Price 5) / 3
    • ($11 + $13 + $14) / 3 = $38 / 3 = $12.67 (rounded)
  • For Day 6: (Price Day 4 + Price Day 5 + Price Day 6) / 3
    • ($13 + $14 + $12) / 3 = $39 / 3 = $13
  • For Day 7: (Price Day 5 + Price Day 6 + Price Day 7) / 3
    • ($14 + $12 + $15) / 3 = $41 / 3 = $13.67 (rounded)

2. Weighted Moving Average (WMA)

The WMA is similar to the SMA, but it gives more importance (weight) to recent data points. This makes it more responsive to new information.

Formula:

WMA = ( (Price_N * Weight_N) + (Price_(N-1) * Weight_(N-1)) + ... + (Price_1 * Weight_1) ) / Sum of Weights

For a 3-period WMA, common weights are 3, 2, 1 (most recent gets 3, oldest gets 1). The sum of weights would be 3+2+1=6.

Worked Example: Calculating WMA

Using the same data and a 3-period WMA with weights 3, 2, 1 (most recent to oldest):

  • For Day 3: ( (Price Day 3 * 3) + (Price Day 2 * 2) + (Price Day 1 * 1) ) / 6
    • ( ($11 * 3) + ($12 * 2) + ($10 * 1) ) / 6 = ($33 + $24 + $10) / 6 = $67 / 6 = $11.17
  • For Day 4: ( (Price Day 4 * 3) + (Price Day 3 * 2) + (Price Day 2 * 1) ) / 6
    • ( ($13 * 3) + ($11 * 2) + ($12 * 1) ) / 6 = ($39 + $22 + $12) / 6 = $73 / 6 = $12.17
  • For Day 5: ( (Price Day 5 * 3) + (Price Day 4 * 2) + (Price Day 3 * 1) ) / 6
    • ( ($14 * 3) + ($13 * 2) + ($11 * 1) ) / 6 = ($42 + $26 + $11) / 6 = $79 / 6 = $13.17
  • For Day 6: ( (Price Day 6 * 3) + (Price Day 5 * 2) + (Price Day 4 * 1) ) / 6
    • ( ($12 * 3) + ($14 * 2) + ($13 * 1) ) / 6 = ($36 + $28 + $13) / 6 = $77 / 6 = $12.83
  • For Day 7: ( (Price Day 7 * 3) + (Price Day 6 * 2) + (Price Day 5 * 1) ) / 6
    • ( ($15 * 3) + ($12 * 2) + ($14 * 1) ) / 6 = ($45 + $24 + $14) / 6 = $83 / 6 = $13.83

3. Exponential Moving Average (EMA)

The EMA also prioritizes recent data, but it does so by applying a 'smoothing factor' that gives exponentially decreasing weight to older observations. This makes it even more responsive than the WMA.

Formula:

EMA = (Current Price - Previous EMA) * Multiplier + Previous EMA

Where:

  • Multiplier (Smoothing Factor) = 2 / (N + 1)
  • N = The number of periods.
  • Previous EMA = The EMA calculated for the period just before the current one.

For the very first EMA calculation in a series, you often use the SMA for that period as the 'Previous EMA'. For example, if you're calculating a 3-period EMA, the first EMA value will be the 3-period SMA.

Worked Example: Calculating EMA

Using the same data and a 3-period EMA:

First, calculate the Multiplier:

  • Multiplier = 2 / (3 + 1) = 2 / 4 = 0.5

Now, let's calculate:

  • For Day 3 (First EMA): We'll use the 3-period SMA for Day 3, which we calculated as $11.

  • For Day 4:

    • Current Price (Day 4): $13
    • Previous EMA (Day 3): $11
    • EMA Day 4 = ($13 - $11) * 0.5 + $11 = ($2) * 0.5 + $11 = $1 + $11 = $12
  • For Day 5:

    • Current Price (Day 5): $14
    • Previous EMA (Day 4): $12
    • EMA Day 5 = ($14 - $12) * 0.5 + $12 = ($2) * 0.5 + $12 = $1 + $12 = $13
  • For Day 6:

    • Current Price (Day 6): $12
    • Previous EMA (Day 5): $13
    • EMA Day 6 = ($12 - $13) * 0.5 + $13 = (-$1) * 0.5 + $13 = -$0.5 + $13 = $12.50
  • For Day 7:

    • Current Price (Day 7): $15
    • Previous EMA (Day 6): $12.50
    • EMA Day 7 = ($15 - $12.50) * 0.5 + $12.50 = ($2.50) * 0.5 + $12.50 = $1.25 + $12.50 = $13.75

Common Pitfalls to Avoid

  • Incorrect Period (N): Make sure you're consistently using the same 'N' (number of periods) throughout your calculation for a specific moving average. Changing N will change the average significantly.
  • Rounding Errors: When doing calculations by hand, try to keep several decimal places, especially for EMA, before rounding your final answer. Small rounding errors can accumulate.
  • Starting EMA: Remember to use the SMA for the initial EMA value, or ensure you have enough historical data to start the iterative EMA calculation properly.
  • Weighting for WMA: Double-check that your weights sum up correctly and are applied to the correct data points (most recent typically gets the highest weight).

When to Use a Calculator

While knowing the manual process is empowering, calculating moving averages by hand, especially for long data series or many different periods, can be tedious and prone to arithmetic errors. This is where a moving average calculator becomes your best friend! It can instantly:

  • Handle large datasets without mistakes.
  • Calculate SMA, WMA, and EMA simultaneously for various periods.
  • Provide quick visual trends and signals.

Think of manual calculation as learning to drive a stick shift – it teaches you how the engine works. But for a long road trip, an automatic transmission (the calculator) is often more practical!

Keep practicing, and you'll soon be a moving average pro!

Ready to Calculate?

Skip the manual work and get instant results.

Open Calculator

Settings

PrivacyTermsAbout© 2026 Calkulon