Skip to content

Exponential Moving Average (EMA) Calculator

Updated:

Calculate the Exponential Moving Average (EMA) of any asset. Enter yesterday's EMA or price, today's price, and the period in days to get the smoothed, trend-weighted average instantly.

Stock EMA Calculation Tool

Input Fields
$
Enter yesterday's EMA value or price
$
Enter today's closing price
Enter the EMA period (number of days)
If enabled, the result will update automatically when you change any value.

Exponential Moving Average (EMA) Formula

Formula
\[ \text{EMA}_{\text{today}} = (P_{\text{today}} \times \alpha) + (\text{EMA}_{\text{yesterday}} \times (1 - \alpha)) \\\ \alpha = \frac{2}{n + 1} \]

Where:

  • \(P_{\text{today}}\) — today's closing price
  • \(\text{EMA}_{\text{yesterday}}\) — yesterday's EMA value (or yesterday's price when starting the calculation)
  • \(\alpha\) — the smoothing factor
  • \(n\) — the number of periods (days)

The smoothing factor \(\alpha\) controls how much weight the latest price receives: the shorter the period, the larger \(\alpha\) and the faster the EMA reacts to new prices.

Exponential Moving Average – Calculation Example

Example: yesterday's EMA was $100, today's closing price is $102, and you want a 10-day EMA.

\[ \alpha = \frac{2}{10 + 1} = \frac{2}{11} \approx 0.1818 \]

\[ \text{EMA} = 102 \times 0.1818 + 100 \times (1 - 0.1818) \approx 18.5455 + 81.8182 = 100.3636 \]

Result: today's EMA is $100.36. The new price pulled the average up only slightly, because with a 10-day period the latest close carries about 18% of the total weight.

How to Use the EMA Calculator

  1. Enter Yesterday's EMA or Price — if you already know yesterday's EMA, use it; if you are starting a new EMA series, enter yesterday's closing price instead.
  2. Enter Today's Price, which is normally the latest closing price of the asset.
  3. Enter the Number of Days (Period) — common choices are 10, 20, 50, or 200 days.
  4. Read the Exponential Moving Average (EMA) result, rounded to four decimal places.
  5. To track the EMA over time, feed each day's result back in as "Yesterday's EMA" the next day.

What Is the Exponential Moving Average?

The Exponential Moving Average (EMA) is a technical indicator that smooths out price data to reveal the underlying trend. Unlike the Simple Moving Average (SMA), which treats every day in the window equally, the EMA assigns exponentially more weight to the most recent prices. This makes it more responsive to fresh market information while still filtering out day-to-day noise.

The responsiveness is governed by the smoothing factor \(\alpha = 2/(n+1)\). With a 10-day period, today's price gets a weight of 2/11 ≈ 18.2%; with a 20-day period it drops to about 9.5%; with a 50-day period, about 3.9%. Shorter EMAs hug the price closely and flip direction often, while longer EMAs move slowly and are harder to disturb — which is why traders often watch both.

The EMA is recursive: each new value is built on top of all previous ones, so old prices never drop out of the calculation entirely — their influence simply decays over time. When you begin a series, practitioners typically seed the first EMA with the closing price (or the SMA of the first \(n\) days). After enough days have passed, the starting value's influence becomes negligible.

Traders interpret the EMA in several ways: price persistently above a rising EMA suggests an uptrend; crossovers of a short EMA above a long EMA (e.g., the 20-day crossing the 50-day) are treated as potential buy signals; and the EMA often acts as dynamic support or resistance in trending markets. If you are evaluating a trading or investment strategy more broadly, tools like the Return on Investment calculator can help you measure the outcome.

Assumptions, Limitations and Practical Tips

  • The EMA is a lagging indicator. Even though it reacts faster than an SMA, it still follows price rather than predicting it. It works best in trending markets and can whipsaw badly in sideways, choppy conditions.
  • One day at a time. This calculator updates the EMA for a single day. To maintain a running EMA, repeat the calculation daily, always entering the previous result as "Yesterday's EMA".
  • Initial value matters at the start. Seeding with the raw price instead of the SMA slightly distorts the first few values; the effect fades as the series grows.
  • Period choice is a trade-off. Short periods give early signals with more false alarms; long periods give reliable trend signals but late entries. Test a period against your asset before committing to it.
  • Prices alone are not a strategy. Combine the EMA with volume, risk management, and your required return threshold — see the Required Rate of Return calculator — before making trading decisions.
  • Units are flexible. Although the fields show dollars, the math works for any currency, index points, or percentage-based prices.

Frequently Asked Questions

How do I calculate the EMA by hand without a calculator?

First compute the smoothing factor \(\alpha = \frac{2}{n+1}\). Then multiply today's price by \(\alpha\), multiply yesterday's EMA by \(1 - \alpha\), and add the two products together. For example, with a 5-day period, \(\alpha = 2/6 \approx 0.3333\). If today closed at $50 and yesterday's EMA was $48, the new EMA is \(50 \times 0.3333 + 48 \times 0.6667 \approx 48.67\).

What is a good EMA period to use?

There is no universally best period — it depends on your goal. Short-term traders commonly use 9 or 12 days for fast signals, swing traders prefer 20 or 21 days, and long-term trend followers rely on 50 and 200 days. The classic "golden cross" and "death cross" signals are based on the 50-day and 200-day EMAs. Shorter periods react quickly but produce more false signals; longer periods are slower but more reliable.

Why is my EMA different from the one on my charting platform?

The most common cause is a different starting point. Because the EMA is recursive, the initial seed value (raw price vs. SMA of the first \(n\) days) influences early results. Differences also arise from using intraday vs. closing prices, different data histories, or how the platform handles the very first bars. After several times the period length (e.g., 200+ days for a 20-day EMA), values from different seeds converge almost completely.

What is the difference between EMA and SMA?

The Simple Moving Average gives equal weight to every price in the window and "forgets" old prices entirely once they leave it. The EMA weights recent prices exponentially more heavily, and old prices never fully drop out — their influence just decays. As a result, the EMA turns faster after a price change, while the SMA is smoother and slower. The EMA suits responsive trading; the SMA suits confirming long, steady trends.

Can I use this calculator for weekly or hourly charts?

Yes. Although the fields are labeled in days, the formula works for any consistent time unit — hours, weeks, or months. A 12-period EMA on a weekly chart uses exactly the same math as a 12-day EMA on a daily chart. Just make sure the "yesterday" and "today" values refer to consecutive bars of the same timeframe, and enter the period as the number of bars, not calendar days.

How many days does it take for the starting value to stop mattering?

Each day, the seed's weight is multiplied by \(1 - \alpha\). After roughly \(3n\) days (three times your period), the seed's remaining weight drops below about 0.1% and is effectively irrelevant. For a 10-day EMA that is about a month of data; for a 50-day EMA, roughly 150 trading days. Until then, small differences in the starting value can slightly shift your EMA.

Is a high or low EMA value good for trading?

The EMA value itself is neither good nor bad — it only shows a smoothed price trend. Traders look at the relationship between price and the EMA: price above a rising EMA suggests upward momentum, while price below a falling EMA suggests weakness. Crossovers between short and long EMAs are used as entry or exit cues, but they lag price and can fail in sideways markets. Always combine the EMA with risk management; past signals do not guarantee future results.

Leave a Reply

Your email address will not be published. Required fields are marked *

4 thoughts on “Exponential Moving Average (EMA) Calculator”

  1. Jenny Lane says:

    Instead of "yesterday's price", the field should be marked "yesterday's EMA"
    if you enter yesterday's EMA, the calculator works

    1. Chris says:

      With this ema calc can I be able to get next value on 5 min tf in binary options

  2. Alex says:

    This calculator is plain WRONG!
    In order to calculate 10 day EMA you need to enter all 10 previous prices, not just the last 2

    1. fwef says:

      Multiplier: (2 / (Time periods + 1) ) = (2 / (10 + 1) ) = 0.1818 (18.18%)
      EMA: {Close - EMA(previous day)} x multiplier + EMA(previous day).