Short-Time Fourier Transform Resolution Calculator

Find the frequency resolution, time resolution, hop size, and frame rate of a short-time Fourier transform from its window length and overlap.

🪄 Short-Time Fourier Transform Resolution Calculator
Sampling rate44100
Hz
1,000 Hz192,000 Hz
Window length (Nw)1024
samples
1616,384
Overlap50
%
0%99%
Frequency resolution
Time resolution
Hop size
Frame rate
Step-by-step working

🪄 What is STFT Resolution?

STFT resolution describes the fundamental trade-off between how precisely a short-time Fourier transform can pin down a signal's frequency content versus how precisely it can pin down when that content occurred. Every spectrogram, the time-vs-frequency-vs-amplitude picture behind everything from voice recognition to seismic analysis, is built by choosing exactly this trade-off through a single number: the analysis window length.

Audio engineers choose STFT window length when building spectrogram displays, pitch trackers, and vocoders, balancing sharp frequency detail against the ability to track fast-changing sounds. Speech recognition systems tune window length and hop size to capture phoneme-level timing without losing the frequency detail needed to distinguish similar sounds. Vibration analysts and seismologists use the same STFT resolution trade-off when hunting for both the frequency and the exact timing of a transient event, a bearing fault click or an earthquake's P-wave arrival.

A common misconception is that a longer analysis window is always "better" because it gives finer frequency detail. It is not: every sample of frequency precision gained by lengthening the window is paid for with an equal loss of timing precision, since the two resolutions are mathematically locked together as reciprocals of each other.

This calculator converts a chosen window length, sampling rate, and overlap percentage into the concrete frequency resolution, time resolution, hop size, and resulting spectrogram frame rate, the numbers every STFT-based analysis actually has to choose.

📐 Formula

Δf = fs/Nw     Δt = Nw/fs     Δf×Δt = 1
Nw = STFT analysis window length (samples)
fs = sampling rate (Hz)
Δf = frequency resolution (Hz), the bin width of each frame's FFT
Δt = time resolution (seconds), the duration of one analysis window
hop = Nw×(1 − overlap), samples advanced between consecutive frames
Example: fs = 44,100 Hz, Nw = 1,024, 50% overlap → Δf = 43.0664 Hz, Δt = 23.2200 ms.

📖 How to Use This Calculator

Steps

1
Enter the sampling rate and window length. Type in your signal's sampling rate and the number of samples in each STFT analysis window.
2
Enter the overlap percentage. Type in how much consecutive windows overlap, as a percentage.
3
Read the resolution and frame rate. Click Calculate to see the frequency resolution, time resolution, hop size, and resulting frame rate.

💡 Example Calculations

Example 1 — Standard Audio Spectrogram

fs = 44,100 Hz, Nw = 1,024 samples, 50% overlap

1
Δf = 44,100 / 1,024 = 43.0664 Hz; Δt = 1,024 / 44,100 = 23.2200 ms
2
Hop = 1,024 × 0.5 = 512 samples (11.6100 ms); frame rate = 86.1328 frames/s
Δf = 43.0664 Hz, Δt = 23.2200 ms, frame rate = 86.1328 frames/s
Try this example →

Example 2 — Short-Window Speech Analysis

fs = 8,000 Hz, Nw = 256 samples, 75% overlap

1
Δf = 8,000 / 256 = 31.2500 Hz; Δt = 256 / 8,000 = 32.0000 ms
2
Hop = 256 × 0.25 = 64 samples (8.0000 ms); frame rate = 125.0000 frames/s
Δf = 31.2500 Hz, Δt = 32.0000 ms, frame rate = 125.0000 frames/s
Try this example →

Example 3 — Long Window, No Overlap

fs = 48,000 Hz, Nw = 4,096 samples, 0% overlap

1
Δf = 48,000 / 4,096 = 11.7188 Hz; Δt = 4,096 / 48,000 = 85.3333 ms
2
Hop = 4,096 × 1.0 = 4,096 samples (85.3333 ms); frame rate = 11.7188 frames/s
Δf = 11.7188 Hz, Δt = 85.3333 ms, frame rate = 11.7188 frames/s
Try this example →

❓ Frequently Asked Questions

What is the short-time Fourier transform (STFT)?+
The STFT applies the Fourier transform to short, often overlapping windows of a signal instead of the whole signal at once, producing a time-varying frequency picture (a spectrogram) rather than a single static spectrum. It is the standard tool for analyzing signals whose frequency content changes over time, like speech, music, or vibration data.
How do you calculate STFT frequency resolution?+
Frequency resolution is delta-f = fs / Nw, exactly the same formula as ordinary FFT bin resolution, where Nw is the number of samples in each analysis window and fs is the sampling rate. A longer window produces a smaller (finer) delta-f.
How do you calculate STFT time resolution?+
Time resolution is delta-t = Nw / fs, simply the duration of one analysis window in seconds. A longer window (better frequency resolution) directly means worse (larger) time resolution, since the transform can no longer tell you exactly when within that window an event happened.
Why does the time-bandwidth product always equal 1?+
Because delta-f = fs/Nw and delta-t = Nw/fs are reciprocals of each other by construction, their product delta-f times delta-t always equals exactly 1, regardless of the chosen window length. This is the STFT's concrete expression of the time-frequency uncertainty principle: you cannot improve one resolution without worsening the other by the same factor.
What is hop size and how does it affect resolution?+
Hop size is how many samples the analysis window advances between consecutive STFT frames, hop = Nw * (1 - overlap). It does not change frequency or time resolution at all, both of which depend only on the window length, but it does change how many spectrogram columns (frames) are produced per second and how smooth the resulting time axis looks.
Why use overlapping windows instead of non-overlapping ones?+
Non-overlapping windows (0% overlap) miss events that straddle a window boundary and produce a jerky, coarse-looking spectrogram. Overlapping windows (commonly 50 to 75%) produce a smoother spectrogram and reduce the chance of a transient landing entirely within the tapered edge of a window, at the cost of more frames (and more computation) per second of signal.
What window length should I use for a spectrogram?+
Choose based on what you need to resolve: shorter windows (better time resolution) suit fast transients like drum hits or consonants in speech, while longer windows (better frequency resolution) suit sustained tones or closely spaced harmonics. There is no universally correct length, only a trade-off matched to the signal and the question being asked.
How is STFT resolution different from plain FFT resolution?+
A plain FFT's frequency resolution formula (delta-f = fs/N) is identical to the STFT's, since the STFT is just a sequence of individual FFTs applied to short windows. The difference is that STFT resolution also has a time-domain counterpart, delta-t = Nw/fs, and a frame rate, both of which do not exist for a single whole-signal FFT.
Does the window function (Hann, Hamming, etc.) change these resolution numbers?+
The core delta-f = fs/Nw and delta-t = Nw/fs formulas describe the ideal rectangular-window case. A tapered window (Hann, Hamming, Blackman) slightly widens the effective frequency resolution (main lobe width) beyond this ideal value, exactly the trade-off covered by the DFT Leakage and Window Function Calculator, in exchange for much lower spectral leakage.
How many frames per second does a typical audio spectrogram use?+
A common audio analysis setup, 1,024-sample windows at 44,100 Hz with 50% overlap, produces a hop of 512 samples and a frame rate of about 86 frames per second, fast enough to track syllable-level speech changes while keeping each FFT's frequency resolution around 43 Hz.

What is the short-time Fourier transform (STFT)?

The STFT applies the Fourier transform to short, often overlapping windows of a signal instead of the whole signal at once, producing a time-varying frequency picture (a spectrogram) rather than a single static spectrum. It is the standard tool for analyzing signals whose frequency content changes over time, like speech, music, or vibration data.

How do you calculate STFT frequency resolution?

Frequency resolution is delta-f = fs / Nw, exactly the same formula as ordinary FFT bin resolution, where Nw is the number of samples in each analysis window and fs is the sampling rate. A longer window produces a smaller (finer) delta-f.

How do you calculate STFT time resolution?

Time resolution is delta-t = Nw / fs, simply the duration of one analysis window in seconds. A longer window (better frequency resolution) directly means worse (larger) time resolution, since the transform can no longer tell you exactly when within that window an event happened.

Why does the time-bandwidth product always equal 1?

Because delta-f = fs/Nw and delta-t = Nw/fs are reciprocals of each other by construction, their product delta-f times delta-t always equals exactly 1, regardless of the chosen window length. This is the STFT's concrete expression of the time-frequency uncertainty principle: you cannot improve one resolution without worsening the other by the same factor.

What is hop size and how does it affect resolution?

Hop size is how many samples the analysis window advances between consecutive STFT frames, hop = Nw * (1 - overlap). It does not change frequency or time resolution at all, both of which depend only on the window length, but it does change how many spectrogram columns (frames) are produced per second and how smooth the resulting time axis looks.

Why use overlapping windows instead of non-overlapping ones?

Non-overlapping windows (0% overlap) miss events that straddle a window boundary and produce a jerky, coarse-looking spectrogram. Overlapping windows (commonly 50 to 75%) produce a smoother spectrogram and reduce the chance of a transient landing entirely within the tapered edge of a window, at the cost of more frames (and more computation) per second of signal.

What window length should I use for a spectrogram?

Choose based on what you need to resolve: shorter windows (better time resolution) suit fast transients like drum hits or consonants in speech, while longer windows (better frequency resolution) suit sustained tones or closely spaced harmonics. There is no universally correct length, only a trade-off matched to the signal and the question being asked.

How is STFT resolution different from plain FFT resolution?

A plain FFT's frequency resolution formula (delta-f = fs/N) is identical to the STFT's, since the STFT is just a sequence of individual FFTs applied to short windows. The difference is that STFT resolution also has a time-domain counterpart, delta-t = Nw/fs, and a frame rate, both of which do not exist for a single whole-signal FFT.

Does the window function (Hann, Hamming, etc.) change these resolution numbers?

The core delta-f = fs/Nw and delta-t = Nw/fs formulas describe the ideal rectangular-window case. A tapered window (Hann, Hamming, Blackman) slightly widens the effective frequency resolution (main lobe width) beyond this ideal value, exactly the trade-off covered by the DFT Leakage and Window Function Calculator, in exchange for much lower spectral leakage.

How many frames per second does a typical audio spectrogram use?

A common audio analysis setup, 1,024-sample windows at 44,100 Hz with 50% overlap, produces a hop of 512 samples and a frame rate of about 86 frames per second, fast enough to track syllable-level speech changes while keeping each FFT's frequency resolution around 43 Hz.