The stochastic oscillator explained

The stochastic oscillator is a momentum indicator that shows where a stock's latest close sits within its high-low range over a recent window. It is associated with George Lane, and it rests on a simple observation: in an uptrend, closes tend to land near the top of the recent range, and in a downtrend they tend to land near the bottom. When closes start slipping away from those extremes, momentum may be fading.
The formula
%K = 100 x (Close - Lowest low over N periods) / (Highest high over N periods - Lowest low over N periods)
%D = 3-period simple moving average of %K
The default window is N = 14 periods. %K tells you where the close is in the range: 100 means the close is at the highest high of the window, 0 means it is at the lowest low, and 50 means it is exactly in the middle. %D is a smoothed version of %K, used as a signal line.
There are two common versions:
- Fast stochastic: uses the raw %K described above, with %D as a 3-period average of it. It is jumpy.
- Slow stochastic: first smooths %K with a 3-period average, and %D is then a 3-period average of that smoothed line. Many charting platforms default to this version, often shown as (14, 3, 3). It is calmer and gives fewer signals.
Because platforms differ in their defaults, check which version a chart is using before comparing readings.
Example (illustrative numbers)
Over the last 14 days, a stock's highest high is $60 and its lowest low is $50, so the range is $10. Over three consecutive days, assume the range stays the same while the close drifts down.
| Day | Close | %K calculation | %K |
|---|---|---|---|
| 1 | $57 | 100 x (57 - 50) / 10 | 70 |
| 2 | $54 | 100 x (54 - 50) / 10 | 40 |
| 3 | $51 | 100 x (51 - 50) / 10 | 10 |
%D, the 3-day average of %K, is (70 + 40 + 10) / 3 = 40.
The reading: the stock slipped from the upper part of its range to the very bottom in three sessions. %K has dropped below %D and below 20, which is the kind of condition people call oversold. It means the close is near the bottom of the recent range. It does not mean the stock is cheap, or that it is about to bounce.
How to read it
- Overbought and oversold. The conventional levels are 80 and 20. A reading above 80 means the close is near the top of its range, and below 20 means it is near the bottom. As with RSI, these levels describe where price sits, not what will happen next.
- %K and %D crossovers. When %K crosses above %D, it signals a pickup in short-term momentum. When it crosses below, momentum is easing. Crossovers that happen inside the extreme zones, such as a cross above %D while below 20, are the ones most often watched.
- Trending markets. In a strong uptrend, the stochastic can stay above 80 for a long time because closes keep landing near the top of the range. In a strong downtrend it can stay below 20. Selling just because the reading crossed 80, or buying because it dropped under 20, often means going against the trend.
- Divergence. If price makes a new high but the stochastic makes a lower high, momentum may be weakening. The logic is the same as in RSI divergence.
Stochastic versus RSI
Both are bounded oscillators from 0 to 100 and both use 80/20 or 70/30 zones, so they are often used for similar purposes. They answer different questions:
| Stochastic | RSI | |
|---|---|---|
| What it measures | Where the close sits in the recent high-low range | Size of recent gains compared with recent losses |
| Sensitivity | Higher; swings quickly between extremes | Lower; smoother |
| Typical weakness | More frequent signals and more noise | Slower to react at turning points |
The RSI article covers that calculation. The two often agree, and when they do, that adds little new information. When they disagree, check what differs: a stock can have a middling RSI while its stochastic is pinned near 100 if closes keep landing at the top of a narrow range.
MACD is another momentum tool, built from moving averages rather than ranges, and it responds to trends more than to range position.
Common mistakes and limits
- Treating the zones as signals. Overbought and oversold only describe position within a range.
- Ignoring the trend. The oscillator is generally considered more useful in sideways markets, where price swings within a range, and less useful in strong trends, where it can stay at an extreme.
- Too many signals. Fast settings and short windows create frequent crossovers, most of them noise. If you notice you are acting on a different signal every few days, the setting may be too fast.
- Mismatched settings. Different tools use different versions, so a reading of 85 on one platform may not equal 85 on another.
- Standalone use. Momentum readings ignore volume, news and valuation. See technical analysis basics for how to combine tools without piling up redundant ones.
Where to see it on StocksXray
Stocks sitting near the bottom of their recent range are the kind of setup the oversold scanner preset is designed to surface. Each stock page, for example Microsoft, shows a price chart with indicators and a technical summary for daily, weekly and monthly time frames.
Key takeaways
- %K = 100 x (Close - Lowest low) / (Highest high - Lowest low) over N periods, typically 14; %D is a 3-period average of %K.
- It shows where the close sits within the recent range, not how much price has gained or lost.
- 80 and 20 are conventional overbought and oversold levels, and in trends the reading can stay there for a long time.
- Fast and slow versions exist; slow is smoother and more common by default.
- It is more sensitive than RSI, so it gives more signals and more noise.
Related reading
Educational only, not financial advice. Examples use illustrative numbers.