Skip to main content
engineering

FFT Analyzer Calculator

FFT magnitude spectrum, dominant frequencies, and THD from generated or custom time-domain signals

Reviewed by Christopher FloiedPublished Updated

This free online fft analyzer calculator provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Supports both metric (SI) and imperial units with built-in unit selection dropdowns on every input field, so you can work in whatever units your problem provides. Designed for engineering students and professionals working through coursework, design projects, or quick reference calculations.

FFT Analyzer Calculator

Compute the discrete Fourier transform of a signal: magnitude spectrum, dominant frequencies, phase, RMS, and total harmonic distortion.

Method & Formulas

Discrete Fourier Transform

X[k]=n=0N1x[n]ej2πkn/N,k=0,1,,N1X[k] = \sum_{n=0}^{N-1} x[n] \cdot e^{-j 2 \pi k n / N}, \quad k = 0, 1, \ldots, N-1

Magnitude spectrum

X[k]=Re(X[k])2+Im(X[k])2|X[k]| = \sqrt{\operatorname{Re}(X[k])^2 + \operatorname{Im}(X[k])^2}

Single-sided normalized amplitude (plotted on the bar chart)

A[k]={X[k]/Nk=02X[k]/N1kN/2A[k] = \begin{cases} |X[k]|/N & k = 0 \\ 2\,|X[k]|/N & 1 \le k \le N/2 \end{cases}

Frequency resolution & Nyquist limit

Δf=fsN,fNyquist=fs2\Delta f = \frac{f_s}{N}, \qquad f_{\text{Nyquist}} = \frac{f_s}{2}

Root-mean-square value

xrms=1Nn=0N1x[n]2x_{\text{rms}} = \sqrt{\frac{1}{N}\sum_{n=0}^{N-1} x[n]^2}

Total Harmonic Distortion (top-5 harmonics)

THD=h=25Ah2A1×100%\text{THD} = \frac{\sqrt{\sum_{h=2}^{5} A_h^2}}{A_1} \times 100\%

Sources: Oppenheim & Schafer, Discrete-Time Signal Processing3e, Ch. 8; Wikipedia: Discrete Fourier Transform. See the References & Further Reading section below for direct links.

fs = 128 Hz · N = 128 · Δf = 1.000 Hz · Nyquist = 64.000 Hz

Signal RMS

0.7071

THD

0.00%

Dominant Freq

5.000 Hz

Peak A[k]

1.0000

Time Domain Signal (first 128 of 128 samples)

Frequency Spectrum (first 64 of 65 bins)

Time-Domain Signal (full resolution, N = 128)

t = n / fs. All 128 samples. Scrollable.

nt (s)x(t)
00.0000000.000000
10.0078130.242980
20.0156250.471397
30.0234380.671559
40.0312500.831470
50.0390630.941544
60.0468750.995185
70.0546880.989177
80.0625000.923880
90.0703130.803208
100.0781250.634393
110.0859380.427555
120.0937500.195090
130.101563-0.049068
140.109375-0.290285
150.117188-0.514103
160.125000-0.707107
170.132813-0.857729
180.140625-0.956940
190.148438-0.998795
200.156250-0.980785
210.164063-0.903989
220.171875-0.773010
230.179688-0.595699
240.187500-0.382683
250.195313-0.146730
260.2031250.098017
270.2109380.336890
280.2187500.555570
290.2265630.740951
300.2343750.881921
310.2421880.970031
320.2500001.000000
330.2578130.970031
340.2656250.881921
350.2734380.740951
360.2812500.555570
370.2890630.336890
380.2968750.098017
390.304688-0.146730
400.312500-0.382683
410.320313-0.595699
420.328125-0.773010
430.335938-0.903989
440.343750-0.980785
450.351563-0.998795
460.359375-0.956940
470.367188-0.857729
480.375000-0.707107
490.382813-0.514103
500.390625-0.290285
510.398438-0.049068
520.4062500.195090
530.4140630.427555
540.4218750.634393
550.4296880.803208
560.4375000.923880
570.4453130.989177
580.4531250.995185
590.4609380.941544
600.4687500.831470
610.4765630.671559
620.4843750.471397
630.4921880.242980
640.5000000.000000
650.507813-0.242980
660.515625-0.471397
670.523438-0.671559
680.531250-0.831470
690.539063-0.941544
700.546875-0.995185
710.554688-0.989177
720.562500-0.923880
730.570313-0.803208
740.578125-0.634393
750.585938-0.427555
760.593750-0.195090
770.6015630.049068
780.6093750.290285
790.6171880.514103
800.6250000.707107
810.6328130.857729
820.6406250.956940
830.6484380.998795
840.6562500.980785
850.6640630.903989
860.6718750.773010
870.6796880.595699
880.6875000.382683
890.6953130.146730
900.703125-0.098017
910.710938-0.336890
920.718750-0.555570
930.726563-0.740951
940.734375-0.881921
950.742188-0.970031
960.750000-1.000000
970.757813-0.970031
980.765625-0.881921
990.773438-0.740951
1000.781250-0.555570
1010.789063-0.336890
1020.796875-0.098017
1030.8046880.146730
1040.8125000.382683
1050.8203130.595699
1060.8281250.773010
1070.8359380.903989
1080.8437500.980785
1090.8515630.998795
1100.8593750.956940
1110.8671880.857729
1120.8750000.707107
1130.8828130.514103
1140.8906250.290285
1150.8984380.049068
1160.906250-0.195090
1170.914063-0.427555
1180.921875-0.634393
1190.929688-0.803208
1200.937500-0.923880
1210.945313-0.989177
1220.953125-0.995185
1230.960938-0.941544
1240.968750-0.831470
1250.976563-0.671559
1260.984375-0.471397
1270.992188-0.242980

Frequency Spectrum (all 65 bins)

f = k · Δf where Δf = 1.000 Hz. Nyquist = 64.000 Hz. Phase in degrees.

kf (Hz)|X[k]|A[k]phase (°)
00.00000.0000000.000000180.000
11.00000.0000000.000000-125.417
22.00000.0000000.000000-47.785
33.00000.0000000.000000120.308
44.00000.0000000.000000-149.672
55.000064.0000001.000000-90.000
66.00000.0000000.000000-10.722
77.00000.0000000.000000-45.092
88.00000.0000000.00000032.262
99.00000.0000000.000000144.870
1010.00000.0000000.000000-35.019
1111.00000.0000000.00000081.286
1212.00000.0000000.000000-2.955
1313.00000.0000000.000000-152.770
1414.00000.0000000.000000-30.581
1515.00000.0000000.000000149.906
1616.00000.0000000.000000177.973
1717.00000.0000000.000000-99.045
1818.00000.0000000.000000-15.379
1919.00000.0000000.000000-79.775
2020.00000.0000000.000000-44.888
2121.00000.0000000.000000111.721
2222.00000.0000000.000000159.246
2323.00000.0000000.0000001.352
2424.00000.0000000.000000-145.541
2525.00000.0000000.000000-93.569
2626.00000.0000000.000000110.562
2727.00000.0000000.00000026.357
2828.00000.0000000.000000-92.705
2929.00000.0000000.000000-91.590
3030.00000.0000000.000000-122.929
3131.00000.0000000.000000-116.112
3232.00000.0000000.000000-102.128
3333.00000.0000000.000000-3.999
3434.00000.0000000.000000-153.322
3535.00000.0000000.00000033.973
3636.00000.0000000.000000-68.708
3737.00000.0000000.000000118.305
3838.00000.0000000.000000127.273
3939.00000.0000000.000000123.026
4040.00000.0000000.000000-157.027
4141.00000.0000000.000000-56.170
4242.00000.0000000.000000-24.647
4343.00000.0000000.000000-86.986
4444.00000.0000000.00000082.614
4545.00000.0000000.00000092.262
4646.00000.0000000.000000-171.604
4747.00000.0000000.00000050.409
4848.00000.0000000.000000-16.159
4949.00000.0000000.00000072.718
5050.00000.0000000.00000072.763
5151.00000.0000000.000000101.565
5252.00000.0000000.00000080.344
5353.00000.0000000.000000-74.665
5454.00000.0000000.000000-177.442
5555.00000.0000000.00000029.685
5656.00000.0000000.000000-74.931
5757.00000.0000000.000000100.340
5858.00000.0000000.00000087.735
5959.00000.0000000.000000-78.343
6060.00000.0000000.000000-43.956
6161.00000.0000000.000000-114.096
6262.00000.0000000.000000-39.318
6363.00000.0000000.000000137.304
6464.00000.0000000.000000155.526

Dominant Frequencies (ranked by A[k])

THD (top-5) is computed from the top five ranked bins of this table.

Rankf (Hz)|X[k]|A[k]phase (°)
15.000064.0000001.000000-90.000
252.00000.0000000.00000080.344
329.00000.0000000.000000-91.590
442.00000.0000000.000000-24.647
545.00000.0000000.00000092.262

How to Use This Calculator

1

Enter your input values

Fill in all required input fields for the FFT Analyzer Calculator. Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.

2

Review your inputs

Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.

3

Read the results

The FFT Analyzer Calculator instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.

4

Explore parameter sensitivity

Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.

Formula Reference

FFT Analyzer Calculator Formula

See calculator inputs for the governing equation

Variables: All variables and their units are labeled in the calculator interface above. Input fields accept values in multiple unit systems — select your preferred unit from the dropdown next to each field.

When to Use This Calculator

  • Use the FFT Analyzer Calculator when solving homework or exam problems that require quick numerical verification of your hand calculations — instant feedback helps identify arithmetic errors before they propagate.
  • Use it during the early design phase to rapidly iterate on parameters and narrow down feasible configurations before committing time to detailed finite element simulations or full design packages.
  • Use it when reviewing a colleague's calculation or checking a vendor's data sheet for plausibility — a quick sanity check can prevent costly downstream errors.
  • Use it to generate reference data for a technical report or presentation without manual computation, ensuring consistent, reproducible numbers throughout the document.
  • Use it in the field when a quick estimate is needed and a full engineering software package is not available.

About This Calculator

The FFT Analyzer Calculator is a precision engineering calculation tool designed for students, engineers, and technical professionals. FFT magnitude spectrum, dominant frequencies, and THD from generated or custom time-domain signals All calculations are performed using established engineering formulas from the relevant scientific literature and standards. Inputs support both metric (SI) and imperial unit systems, with unit conversion handled automatically — simply select your preferred unit from the dropdown next to each field. Results are computed instantly in the browser without sending data to a server, ensuring both speed and privacy. This calculator is intended as a supplementary tool for learning and design exploration; always verify results against authoritative references for safety-critical applications.

The Theory Behind It

The Fast Fourier Transform (FFT) converts a time-domain signal x(t) into a frequency-domain representation X(f), decomposing the signal into its constituent sinusoidal components. For a discrete signal with N samples at sampling rate f_s, the FFT produces N/2 + 1 complex coefficients X_k at frequencies f_k = k·f_s/N for k = 0, 1, ..., N/2. The magnitude |X_k| gives the amplitude of the sinusoidal component at frequency f_k, and the phase gives the corresponding phase angle. FFT is the key tool in signal processing, vibration analysis, audio analysis, and spectrum analysis. Key parameters: sampling rate f_s must satisfy Nyquist criterion (f_s > 2·f_max), frequency resolution Δf = f_s/N (smaller N means coarser resolution), and bin width determines what frequency separation can be resolved. Windowing (Hamming, Hann, flat-top) is used to reduce spectral leakage — the smearing of energy into adjacent frequency bins when the signal isn't exactly periodic in the measurement window. Rectangular window has maximum leakage; flat-top has the best amplitude accuracy; Hamming/Hann are general-purpose compromises. Total harmonic distortion (THD) is Σ(harmonic amplitudes)²/(fundamental amplitude²), expressed as a percentage. The calculator performs FFT on input time data, computes the magnitude spectrum, identifies dominant frequencies, and calculates THD.

Real-World Applications

  • Vibration analysis: FFT of vibration signals from accelerometers identifies rotation speeds, bearing fault frequencies, and resonances in rotating machinery.
  • Audio frequency analysis: musical tone identification, speech spectrum analysis, and audio equalization all use FFT-based spectral analysis.
  • Power quality monitoring: FFT of AC waveforms identifies harmonic distortion caused by nonlinear loads, important for regulatory compliance.
  • Structural health monitoring: changes in natural frequencies indicate structural damage; FFT of ambient vibration provides in-situ measurement.
  • Electrocardiogram analysis: FFT of ECG signals identifies heart-rate frequencies and diagnostic spectral features.

Frequently Asked Questions

What is FFT?

Fast Fourier Transform, an algorithm that efficiently computes the discrete Fourier transform (DFT) of a signal. It converts time-domain samples into frequency-domain coefficients, revealing the sinusoidal components (frequencies) present in the signal. FFT is the basis of modern spectrum analysis.

What's the Nyquist frequency?

The Nyquist frequency f_N = f_s/2 is the highest frequency that can be uniquely represented by a discrete signal at sampling rate f_s. Signals above f_N will 'alias' — appear at incorrect lower frequencies. To measure a signal up to f_max, you need f_s > 2·f_max. In practice, use f_s ≈ 2.5-5× f_max to allow for imperfect anti-aliasing filters.

What is frequency resolution?

Δf = f_s/N is the spacing between FFT frequency bins. Smaller Δf (finer resolution) requires more samples N at the same sampling rate f_s. For example, 1024 samples at 1000 Hz gives Δf = 0.98 Hz. To resolve two frequencies 1 Hz apart, you need at least Δf < 1 Hz, so N > 1000 samples. Improving resolution takes a longer measurement time (T = N/f_s).

What's windowing and why do I need it?

Windowing multiplies the signal by a tapered function (Hamming, Hann, flat-top) to reduce spectral leakage — the smearing of energy into adjacent bins when the signal isn't exactly periodic within the measurement window. Rectangular (no) window has maximum leakage. Hann window balances leakage and resolution. Flat-top has the best amplitude accuracy for measuring specific tones. Use Hann for general spectrum analysis and flat-top for precise amplitude measurement of tones.

What's THD?

Total Harmonic Distortion measures how much a signal deviates from a pure sine wave by computing the energy ratio of all harmonics to the fundamental: THD = √(Σ V_k²) / V_1, where k = 2, 3, 4, ..., expressed as a percentage. For AC power: THD < 5% is considered good; audio amplifiers: < 0.1% for good quality. High THD indicates nonlinear distortion that degrades signal quality and can cause electromagnetic interference.

Related Calculators

References & Further Reading