Home › Calculators › Moving Average Calculator

Moving Average Calculator

Smooth out a series of numbers such as prices, sales or sensor readings. Paste the data, choose the window size and the type of average (simple, exponential, weighted or all three) and get the full averaged series as a table and a line chart, plus the formulas worked through with your values.

Last updated:

Separate values with commas, spaces or new lines; don't use thousands separators

Between 0 and 1. Empty = 2 ÷ (N + 1)

Enter your values to see the result.
Advertisement
Advertisement

How to use the Moving Average Calculator

  1. Paste your series in time order, oldest first, separated by commas, spaces or new lines.
  2. Set the window size, e.g. 5 for a 5-day or 3 for a 3-month moving average.
  3. Choose the type: simple, exponential, weighted, or compare all three.
  4. Read the latest average and the trend, and look at the chart.
  5. Download the CSV or copy the whole series.

Moving average formulas

TypeFormula (window N)Behaviour
Simple (SMA)(x_t + x_(t−1) + … + x_(t−N+1)) ÷ NEqual weights, smooth, lags the most
Weighted (WMA)(N·x_t + (N−1)·x_(t−1) + … + 1·x_(t−N+1)) ÷ (N(N+1)/2)Linearly more weight on recent values
Exponential (EMA)α·x_t + (1 − α)·EMA_(t−1), α = 2 ÷ (N + 1)Weights decay geometrically, reacts fastest

Worked example (window 3)

Monthly sales 120, 135, 128, 150, 162:

MonthSalesSMA(3)WMA(3)EMA(3), α = 0.5
1120———
2135———
3128127.67129.00127.67
4150137.67140.17138.83
5162146.67152.33150.42

The EMA starts from the first SMA (127.67), then 0.5 × 150 + 0.5 × 127.67 = 138.83 and 0.5 × 162 + 0.5 × 138.83 = 150.42.

Frequently asked questions

What is a simple moving average?

The simple moving average (SMA) of window N is the plain average of the last N values: (x₁ + x₂ + … + x_N) ÷ N. Each new point drops the oldest value and adds the newest, so the average “moves” along the series.

How is the exponential moving average calculated?

EMA_today = α × value_today + (1 − α) × EMA_yesterday, with α = 2 ÷ (N + 1) by default. This calculator starts the EMA with the SMA of the first N values, the most common convention. Recent values get more weight and older values fade out gradually.

What is a weighted moving average?

A linearly weighted moving average gives the newest value weight N, the one before N − 1, and so on down to 1, then divides by N(N + 1) ÷ 2. For N = 3: (3x₃ + 2x₂ + x₁) ÷ 6.

Which moving average should I use?

SMA is easiest to explain and smooths evenly. EMA and WMA react faster to recent changes, which is why traders often prefer them for prices. For forecasting or noise reduction, try several window sizes and compare.

Why are the first few values blank?

A moving average with window N needs N values, so the first N − 1 points have no complete window. The averaged series therefore starts at point N.

How do I choose the window size?

Larger windows smooth more but lag further behind changes; smaller windows follow the data closely but keep more noise. Match the window to the cycle in your data, e.g. 7 for daily data with a weekly pattern or 12 for monthly data with a yearly one.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Average CalculatorMean, weighted average, median, sum, min and max of any list.Weighted Average CalculatorCalculate a weighted mean from values and weights, step by step.Stock Average CalculatorAverage cost of several stock buys, plus how many shares to buy to reach a target average.Linear Regression CalculatorLeast-squares line of best fit: slope, intercept, r, r², predictions and a scatter plot.Sales Forecast CalculatorProject 12-36 months of revenue from baseline, growth rate, churn and seasonality.Standard Deviation CalculatorStandard deviation, variance, mean, median, mode and quartiles.A/B Test Significance CalculatorCheck if your A/B test result is statistically significant.Z-Score CalculatorZ-score from a value, mean and SD, plus percentile and p-value; or the value from z.Probability CalculatorFind and, or, not, conditional and at-least-once probabilities from P(A) and P(B).Permutation and Combination CalculatorCalculate nPr and nCr, with or without repetition, as exact big numbers.Mean Median Mode CalculatorFind the mean, median, mode, range, min, max, sum and count of a list of numbers.Confidence Interval CalculatorConfidence interval and margin of error for a mean or a proportion, with steps.Sample Size CalculatorHow many survey responses you need for a given confidence level and margin of error.Percentile CalculatorValue at any percentile, percentile rank of a score, quartiles, IQR and outliers.Correlation Coefficient CalculatorPearson r and Spearman rank correlation with significance and interpretation.Average Order Value CalculatorAverage order value from revenue and orders, plus the revenue impact of raising AOV.Binomial Distribution CalculatorBinomial probabilities P(X = k), at most, at least or between, with mean, variance and chart.Normal Distribution CalculatorNormal probabilities P(X < x), between two values and inverse percentiles, on a shaded bell curve.Poisson Distribution CalculatorPoisson probabilities for a rate λ: exactly k, at most, at least or between, with a chart.T-Test CalculatorOne-sample, two-sample (Welch/pooled) and paired t-tests with p-value and CI.Chi-Square CalculatorChi-square goodness-of-fit and independence tests with p-value and expected counts.P-Value CalculatorOne- or two-tailed p-values from z, t, chi-square or F statistics, with critical values.Variance CalculatorSample and population variance and standard deviation with a step-by-step deviations table.Five Number Summary CalculatorMin, Q1, median, Q3, max, IQR and fences of a data set, with a box plot.Outlier CalculatorFind outliers with 1.5×/3× IQR fences, z-scores or modified z-scores; get the cleaned data.Geometric Mean CalculatorGeometric, harmonic, arithmetic and quadratic means compared, or average growth from % changes.Expected Value CalculatorExpected value, variance and standard deviation from outcomes and their probabilities.One-Way ANOVA CalculatorOne-way ANOVA for 2-10 groups: SS, df, MS, F statistic, p-value, effect size and full table.Bayes Theorem CalculatorPosterior P(A|B) from P(A), P(B|A) and P(B|not A), with a probability tree and table.Box Plot MakerPaste data to draw box-and-whisker plots with quartiles, IQR and outliers. Download PNG or SVG.Coefficient of Variation CalculatorCV % from a dataset (sample or population) with mean, SD and a two-dataset comparison.Critical Value CalculatorCritical values of z, t, chi-square and F for any alpha, tails and degrees of freedom.Dice Probability CalculatorOdds of rolling a sum (exactly, at least, at most) with any dice, plus the full distribution.Effect Size Calculator (Cohen's d)Cohen's d, Hedges' g and Glass's delta from two means, SDs and sample sizes, with CI.Frequency Table GeneratorMake a frequency, relative and cumulative frequency table from numbers or categories.Histogram MakerPaste numbers, choose bins and get a histogram, frequency table and PNG download.Margin of Error CalculatorSurvey margin of error from sample size, confidence and proportion, with population correction.Odds Ratio and Relative Risk CalculatorOdds ratio, relative risk, risk difference, 95% CIs and p-values from a 2x2 table.Statistical Power CalculatorPower or required sample size for t-tests, proportions and correlations, with a power curve.T Distribution CalculatorStudent's t probabilities and critical values for any df, with the area shaded on the curve.T-Table (Student's t Distribution)Interactive t-table: critical t-values for any df and α, p-values, and a printable full table.Z-Test CalculatorOne-sample, two-sample and proportion z-tests with z, p-value, decision and shaded curve.Shannon Entropy CalculatorEntropy of text, data or probabilities in bits, nats or hartleys with a frequency table.Standard Error CalculatorStandard error of the mean from data or SD and n, plus SE of a proportion, with CIs.Descriptive Statistics CalculatorPaste data and get mean, median, mode, quartiles, SD, skewness, kurtosis and a histogram.Empirical Rule Calculator68-95-99.7 rule ranges from a mean and standard deviation, with a shaded bell curve.Z-Table (Standard Normal Table)Interactive z-table: find the area for any z-score, or the z-score for a probability.Average Rate of Change CalculatorAverage rate of change of f(x), two points or a data table over [a, b], with the secant line.Binomial Expansion CalculatorExpand (a + b)^n with the binomial theorem: every term, Pascal coefficients and any specific term.Combinations GeneratorList every k-combination of your items, with or without repetition, and copy or export them.Covariance CalculatorSample and population covariance of paired X and Y data, with a step table and scatter plot.Grouped Data CalculatorMean, median, mode, variance and standard deviation from class intervals and frequencies.Inverse Normal Distribution CalculatorinvNorm: find the x or z value for a left, right, central or two-tail area, with a shaded curve.Permutations GeneratorList all permutations of letters, words or items, with k-permutations and repeats, and export them.
See all 52 Statistics & Probability Calculators →