Weighted Moving Average (WMA) Calculator

Compute weighted moving averages with linear or user-defined weights. Visualize trend smoothing, analyze financial time series, and export results.

Enter numeric values. Use commas, spaces, or mix.
Number of periods for WMA.
Enter comma-separated weights of length = window size. Example: 1,2,3,4 (linear increasing).
? Stock Prices (10 days)
? Quarterly Demand (5 periods)
?️ Temperature Trend (window 4)
? Linear weights (window 5)
Privacy first: All calculations and graphics are performed locally in your browser — zero data transfer.
Disclaimer: This tool is provided for educational and analytical purposes only. It does not constitute financial advice or investment recommendations. Always consult a qualified professional before making financial decisions.

What is Weighted Moving Average (WMA)?

The Weighted Moving Average (WMA) is a technical indicator that assigns different weights to data points, giving more importance to recent observations. Unlike the Simple Moving Average (SMA) which treats every value equally, WMA provides a smoother and more responsive trend line — making it invaluable in financial analysis, supply chain forecasting, and signal processing.

? Linear WMA Formula:

WMAt = (Pt-n+1·1 + Pt-n+2·2 + ... + Pt·n) / (1+2+...+n)

Where weights increase linearly. For custom weights, any positive real numbers can be used.

Our calculator supports both linear increasing weights (default) and fully custom weight vectors. It computes the WMA series for your time series, generates an interactive line chart, and presents a detailed table with period‑by‑period breakdown. The WMA reduces lag compared to SMA and reacts faster to price or demand shifts — a core concept in technical analysis (e.g., WMA crossover strategies).

Why Use This WMA Calculator?

  • ? Accurate & Transparent: Step‑by‑step calculation logic, full weight display, and clear visualization.
  • ? Customizable Weights: From linear to front‑loaded or custom distributions (e.g., exponential decay pattern by entering your own weights).
  • ? Visual Comparison: Overlay original data vs. WMA line on the same chart to instantly see smoothing effects.
  • ? Educational Value: Perfect for students, traders, or analysts learning time series smoothing.

Real‑World Applications & Case Studies

Finance: Stock Price Trend Identification

Many traders use 10‑day or 20‑day WMA to identify short‑term momentum. For instance, when a 5‑day WMA crosses above a 20‑day WMA, it may signal a bullish reversal. Our calculator allows testing custom weight configurations to optimize sensitivity.

Supply Chain: Demand Forecasting

Retail analysts apply WMA to weekly sales data, assigning higher weights to recent weeks to capture seasonality. Using the custom weights feature, you can design a weighting scheme that reflects market responsiveness.

How to Use the Calculator

  1. Enter your data series (e.g., closing prices, temperatures, sales figures).
  2. Define the window size (number of periods).
  3. Optionally, provide custom weights (must have length = window size).
  4. Click "Calculate WMA & Draw" to generate results, table, and interactive chart.
  5. Analyze the smoothed trend, copy results, or experiment with different examples.

The Mathematics Behind Weighted Moving Average

Given a sequence X = {x1, x2, ..., xN} and a window size n, the WMA for position t (where t ≥ n) is defined as:

WMAt = Σi=1 to n (wi · xt-n+i) / Σi=1 to n wi

Where wi are the weights. For linear weights, wi = i. The denominator is the sum of weights, ensuring normalization. The WMA series has length N - n + 1. Our implementation aligns each WMA value with the last period of its window, making it intuitive for backtesting.

Properties: WMA reduces noise while preserving trend direction; it responds faster to recent changes compared to SMA. However, selecting optimal weights requires domain knowledge — our calculator gives you full control to experiment.

Methodology & references: This tool implements the standard weighted moving average definition as described in widely cited literature: Hyndman, R.J., & Athanasopoulos, G. (2021) "Forecasting: Principles and Practice"; and Murphy, J.J. "Technical Analysis of Financial Markets". The calculation logic follows the conventional formula and has been verified against multiple manually computed test cases.

Frequently Asked Questions

WMA assigns decreasing linear weights, while EMA applies exponentially decreasing weights. EMA is more computationally complex but reacts faster; WMA is intuitive and fully customizable in our tool.

Absolutely. Enter any comma‑separated positive numbers (e.g., 0.5,1,2,5) as custom weights. They will be normalized automatically. Perfect for front‑weighted or harmonic patterns.

Custom weights let you prioritize specific periods. For example, if the most recent data is most important, use higher weights at the end of the list (e.g., 1,2,5). For seasonal patterns, you can repeat a pattern of weights. Experiment with different configurations to see how they affect smoothness and lag.

The original data points are shown as a dark line with markers. The WMA line (red) is smoother. When WMA rises above the original, it indicates a strengthening trend; crossovers can signal reversals.

The calculator will show an error message. Window size must be at least 1 and ≤ total data points to compute at least one WMA value.
References & validation: Investopedia – Weighted Moving Average | Forecasting: Principles and Practice (Hyndman) | Wikipedia: Moving Average.
✔ This implementation strictly follows the standard WMA definition. Algorithm accuracy has been cross‑checked against manually computed examples and matches expected outputs.

What is Weighted Moving Average (WMA)?

The Weighted Moving Average (WMA) is a technical indicator that assigns different weights to data points, giving more importance to recent observations. Unlike the Simple Moving Average (SMA) which treats every value equally, WMA provides a smoother and more responsive trend line — making it invaluable in financial analysis, supply chain forecasting, and signal processing.

? Linear WMA Formula:

WMAt = (Pt-n+1·1 + Pt-n+2·2 + ... + Pt·n) / (1+2+...+n)

Where weights increase linearly. For custom weights, any positive real numbers can be used.

Our calculator supports both linear increasing weights (default) and fully custom weight vectors. It computes the WMA series for your time series, generates an interactive line chart, and presents a detailed table with period‑by‑period breakdown. The WMA reduces lag compared to SMA and reacts faster to price or demand shifts — a core concept in technical analysis (e.g., WMA crossover strategies).

Why Use This WMA Calculator?

  • ? Accurate & Transparent: Step‑by‑step calculation logic, full weight display, and clear visualization.
  • ? Customizable Weights: From linear to front‑loaded or custom distributions (e.g., exponential decay pattern by entering your own weights).
  • ? Visual Comparison: Overlay original data vs. WMA line on the same chart to instantly see smoothing effects.
  • ? Educational Value: Perfect for students, traders, or analysts learning time series smoothing.

Real‑World Applications & Case Studies

Finance: Stock Price Trend Identification

Many traders use 10‑day or 20‑day WMA to identify short‑term momentum. For instance, when a 5‑day WMA crosses above a 20‑day WMA, it may signal a bullish reversal. Our calculator allows testing custom weight configurations to optimize sensitivity.

Supply Chain: Demand Forecasting

Retail analysts apply WMA to weekly sales data, assigning higher weights to recent weeks to capture seasonality. Using the custom weights feature, you can design a weighting scheme that reflects market responsiveness.

How to Use the Calculator

  1. Enter your data series (e.g., closing prices, temperatures, sales figures).
  2. Define the window size (number of periods).
  3. Optionally, provide custom weights (must have length = window size).
  4. Click "Calculate WMA & Draw" to generate results, table, and interactive chart.
  5. Analyze the smoothed trend, copy results, or experiment with different examples.

The Mathematics Behind Weighted Moving Average

Given a sequence X = {x1, x2, ..., xN} and a window size n, the WMA for position t (where t ≥ n) is defined as:

WMAt = Σi=1 to n (wi · xt-n+i) / Σi=1 to n wi

Where wi are the weights. For linear weights, wi = i. The denominator is the sum of weights, ensuring normalization. The WMA series has length N - n + 1. Our implementation aligns each WMA value with the last period of its window, making it intuitive for backtesting.

Properties: WMA reduces noise while preserving trend direction; it responds faster to recent changes compared to SMA. However, selecting optimal weights requires domain knowledge — our calculator gives you full control to experiment.

Methodology & references: This tool implements the standard weighted moving average definition as described in widely cited literature: Hyndman, R.J., & Athanasopoulos, G. (2021) "Forecasting: Principles and Practice"; and Murphy, J.J. "Technical Analysis of Financial Markets". The calculation logic follows the conventional formula and has been verified against multiple manually computed test cases.

Frequently Asked Questions

WMA assigns decreasing linear weights, while EMA applies exponentially decreasing weights. EMA is more computationally complex but reacts faster; WMA is intuitive and fully customizable in our tool.

Absolutely. Enter any comma‑separated positive numbers (e.g., 0.5,1,2,5) as custom weights. They will be normalized automatically. Perfect for front‑weighted or harmonic patterns.

Custom weights let you prioritize specific periods. For example, if the most recent data is most important, use higher weights at the end of the list (e.g., 1,2,5). For seasonal patterns, you can repeat a pattern of weights. Experiment with different configurations to see how they affect smoothness and lag.

The original data points are shown as a dark line with markers. The WMA line (red) is smoother. When WMA rises above the original, it indicates a strengthening trend; crossovers can signal reversals.

The calculator will show an error message. Window size must be at least 1 and ≤ total data points to compute at least one WMA value.
References & validation: Investopedia – Weighted Moving Average | Forecasting: Principles and Practice (Hyndman) | Wikipedia: Moving Average.
✔ This implementation strictly follows the standard WMA definition. Algorithm accuracy has been cross‑checked against manually computed examples and matches expected outputs.