This calculator gives estimates for education and planning. It is not investment, tax or legal advice; for decisions about your own situation, talk to a qualified financial professional.
The stochastic oscillator asks a simple question: is the price closing near the top or the bottom of its recent range? This stochastic oscillator calculator takes the highest high, the lowest low and the latest close with two earlier values to give %K, %D and the overbought or oversold zone.
How the calculation works
- %K = (latest close − lowest low) ÷ (highest high − lowest low) × 100, over the last 14 periods in the standard setting.
- %D = the average of the last three %K values, a smoothed signal line.
- Range = highest high − lowest low. If the range is zero, the calculator shows 50 %.
- Reading the result: above 80 is called overbought and below 20 oversold, while values in between are neutral.
- Crossovers: traders watch %K crossing %D, often only when the lines are in the overbought or oversold zones.
Example
Over 14 periods the high was 120 and the low 100, and the latest close is 114. %K = (114 − 100) ÷ (120 − 100) × 100 = 70.0 %. With earlier %K values of 75 % and 80 %, %D is the average of the three, 75.0 %, so %K is below %D while both are in the neutral zone.
Why it matters
In an uptrend, closes tend to land near the top of the range, and in a downtrend near the bottom. The oscillator measures that tendency and flags when a move may be running out of strength. Computing it by hand helps to understand the signal and to check the values on a chart or in a script.
Good to know
Like other oscillators, the stochastic can stay in the overbought or oversold zone for long stretches during a strong trend, so a reading beyond 80 or 20 is not a signal on its own. The standard 14 and 3 settings are conventions, and different platforms smooth in slightly different ways. It works best in ranging markets and poorly in persistent trends, so combine it with trend and risk rules and treat it as one input.
Related tools
The RSI calculator is the other widely used momentum oscillator, the exponential moving average calculator gives the trend, and the pivot point calculator marks levels where the price might turn.