---
type: "Lesson"
title: "Simple moving average (SMA)"
description: "A simple moving average (SMA) is the plain average of the last n closing prices, recalculated each day so it \"moves\" along the chart."
tags: ["sma","simple moving average","moving average","ma","50 day moving average","200 day moving average","trend"]
sources: [{"id":"s1","resource":"https://en.wikipedia.org/wiki/Moving_average"}]
generated: {"by":"process:eqdoc-okf-export","at":"2026-10-25"}
stale_after: "2027-04-25"
x-eqdoc-id: "ta-simple-moving-average"
x-eqdoc-reviewed-at: "2026-10-25"
x-eqdoc-questions: ["What is a simple moving average?","How is the 200-day moving average calculated?","How do I read a moving average on a chart?"]
x-eqdoc-licence-note: "Written by eqdoc in its own words; facts checked against the CC BY-SA page listed"
---

A simple moving average (SMA) is the plain average of the last n closing prices, recalculated each day so it "moves" along the chart.

- **How it is calculated.** Add the last n closes and divide by n. Each new day, the oldest close drops out and the newest comes in.
  `SMA(n) = (C1 + C2 + ... + Cn) / n`
- **A made-up example.** If a share closed at ₹100, ₹102, ₹101, ₹104 and ₹103 over five days, the 5-day SMA is ₹510 / 5 = ₹102.
- **Common settings.** 20 days (about a month of trading), 50 days and 200 days (about 80% of a year's trading sessions) are the lengths most charts show. The TA-Lib function is `SMA`.
- **How analysts read it.** The SMA smooths out daily noise so the direction is easier to see. A rising SMA describes prices that have been drifting up over that window; a falling one, the reverse. Price sitting above its 200-day SMA is conventionally described as being in a long-term uptrend. Some analysts watch the line as a level where price has paused before.
- **What it does not tell you.** An SMA only summarises the past. It lags: by the time a 200-day average turns, much of the move has already happened. Every day in the window carries the same weight, so an old, unusual day affects the average as much as yesterday does, and its drop-out can jerk the line. In a sideways market price crosses the SMA back and forth often, and those crossings say little.
- **India note.** NSE and BSE trade about 250 sessions a year, so "200-day" means 200 trading sessions, not calendar days. Averages should be built on prices adjusted for splits and bonus issues; otherwise a split shows up as a false crash below the line.
