Moving Average Calculator -- SMA, EMA & WMA

Calculate simple, weighted, and exponential moving averages from a data series

Calculate Moving Averages

Enter your data values below (comma-separated or one per line), select a period and type, and see the moving average series with chart visualization.

Current MA Value
--
Trend Direction
--
Data Points
--
Data Mean
--
Data vs Moving Average
Original Data SMA (5) Crossover
Crossover Detection

    Full Moving Average Series

    # Value SMA (5) Difference

    Moving Average Formulas

    Simple Moving Average (SMA)

    The SMA calculates the arithmetic mean of the most recent n data points:

    SMA = (V1 + V2 + ... + Vn) / n

    Where V1 through Vn are the n most recent values. Each value carries equal weight. The SMA is the most straightforward moving average and is easy to understand and compute.

    Exponential Moving Average (EMA)

    The EMA applies exponentially decreasing weights to older data, making it more responsive to recent changes:

    Multiplier (k) = 2 / (n + 1)
    EMA_today = Value_today * k + EMA_yesterday * (1 - k)

    The first EMA value is typically initialized as the SMA of the first n data points. Because recent values receive higher weight, the EMA reacts faster to price changes than the SMA.

    Weighted Moving Average (WMA)

    The WMA assigns linearly increasing weights to more recent values:

    WMA = (V1 * 1 + V2 * 2 + ... + Vn * n) / (1 + 2 + ... + n)
    Weight denominator = n * (n + 1) / 2

    The most recent value gets weight n, the second most recent gets weight n-1, and so on. This provides a middle ground between SMA and EMA -- more recent data matters more, but the weighting is linear rather than exponential.

    Comparing SMA, EMA, and WMA

    FeatureSMAEMAWMA
    Weighting Equal weight to all values Exponentially decreasing Linearly decreasing
    Responsiveness Slowest Fastest Medium
    Lag Highest lag Lowest lag Moderate lag
    Best for Long-term trend identification Short-term trading signals Balanced analysis
    Noise sensitivity Low Higher Moderate
    Computation Simplest Recursive Moderate

    Common Moving Average Periods

    PeriodCommon UseDescription
    5Short-term tradingCaptures weekly trends in daily data; very responsive
    10Short-term analysisTwo-week view; popular for quick momentum signals
    20Swing tradingRoughly one month of trading days; widely used support/resistance
    50Medium-term trendQuarterly view; key level watched by institutional traders
    100Intermediate trendRoughly half a year; smooths out most short-term noise
    200Long-term trendThe most widely followed MA; defines bull vs bear markets

    Applications of Moving Averages

    Finance and Trading

    Moving averages are among the most popular technical analysis indicators. Traders use them to:

    • Identify trends: When price is above the MA, the trend is generally up; below it, the trend is down.
    • Find support and resistance: Moving averages often act as dynamic support or resistance levels.
    • Generate trading signals: Crossovers between price and MA, or between two MAs of different periods, can signal buy or sell opportunities.
    • Smooth volatility: MAs filter out short-term price fluctuations to reveal the underlying trend direction.

    Signal Processing

    In engineering and science, moving averages serve as low-pass filters that reduce high-frequency noise in data streams. Applications include:

    • Audio signal smoothing
    • Sensor data filtering (temperature, pressure, acceleration)
    • Image processing (blur and noise reduction)
    • Network traffic analysis

    Business and Economics

    Moving averages help identify trends in business metrics:

    • Sales forecasting and seasonal adjustment
    • Inventory demand planning
    • Quality control (monitoring process output over time)
    • Economic indicators (GDP growth, unemployment rates)

    Frequently Asked Questions

    What is a moving average?

    A moving average is a statistical calculation that smooths data by averaging subsets of data points over a specified period. As new data arrives, the oldest value drops out and the newest is included, causing the average to "move" along the data series. It is widely used in finance, signal processing, and business analytics to identify trends and reduce noise.

    What is the difference between SMA, EMA, and WMA?

    The Simple Moving Average (SMA) gives equal weight to all values in the period. The Weighted Moving Average (WMA) assigns linearly increasing weights to more recent values. The Exponential Moving Average (EMA) applies exponentially decreasing weights to older data, making it the most responsive to recent changes. The choice depends on whether you prioritize smoothness (SMA) or responsiveness (EMA).

    How do I choose the right period?

    Short periods (5-10) react quickly to changes and capture short-term patterns. Medium periods (20-50) provide a balance between smoothness and responsiveness. Long periods (100-200) reveal long-term trends while filtering out most noise. In stock trading, 50-day and 200-day moving averages are the most widely watched. For other applications, the ideal period depends on the frequency and characteristics of your data.

    What is a moving average crossover?

    A crossover occurs when the data value crosses above or below the moving average line. A bullish crossover happens when the value moves above the MA, suggesting upward momentum. A bearish crossover occurs when the value drops below the MA, suggesting downward momentum. Traders often use crossovers as entry or exit signals.

    Can I use moving averages for non-financial data?

    Yes. Moving averages work with any time-series or sequential data. They are used in weather analysis (temperature trends), manufacturing (quality control), web analytics (traffic smoothing), scientific research (sensor data filtering), and many other fields.

    Why does the EMA require fewer data points to start?

    The EMA is typically seeded with the SMA of the first n values, then computed recursively from that point forward. While it technically starts at the same point as the SMA, its recursive nature means every subsequent value incorporates all prior data, giving it a longer effective memory than the WMA or SMA.

    Does this calculator store my data?

    No. All calculations run entirely in your browser. No data is sent to any server, and nothing is stored.

    Privacy

    This calculator runs entirely in your browser. No data is transmitted or stored anywhere. Your data values never leave your device.

    Related Tools

    Related Tools

    View all tools

    Moving Average Calculator FAQ

    What is a moving average?

    A moving average is a statistical calculation that smooths data by averaging subsets of data points over a specified period. It is widely used in finance to identify trends and in signal processing to reduce noise.

    What is the difference between SMA, EMA, and WMA?

    SMA (Simple Moving Average) gives equal weight to all values in the period. WMA (Weighted Moving Average) assigns linearly increasing weights to more recent values. EMA (Exponential Moving Average) applies exponentially decreasing weights, making it most responsive to recent changes.

    How do I choose the right moving average period?

    Short periods (5-10) react quickly to changes and are useful for short-term analysis. Medium periods (20-50) balance responsiveness and smoothness. Long periods (100-200) show long-term trends. The best period depends on your data and analysis goals.

    What is a moving average crossover?

    A crossover occurs when the data value crosses above or below the moving average line. In trading, a bullish crossover (price crosses above MA) may signal a buy opportunity, while a bearish crossover (price crosses below MA) may signal a sell opportunity.

    Does this calculator store my data?

    No. All calculations run entirely in your browser. No data is sent to any server, and nothing is stored.

    Request a New Tool
    Improve This Tool