Signal Input Form
Use comma, space, or new-line separated samples. The form uses a 3-column layout on large screens, 2 columns on smaller screens, and 1 column on mobile.
Example Data Table
This sample uses 64 Hz sampling and a composite signal with strong 8 Hz and 16 Hz components.
| Sample Index n | Example x[n] |
|---|---|
| 0 | 0.000000 |
| 1 | 1.448528 |
| 2 | 1.200000 |
| 3 | 0.248528 |
| 4 | 0.000000 |
| 5 | -0.248528 |
| 6 | -1.200000 |
| 7 | -1.448528 |
| 8 | -5.878305e-16 |
| 9 | 1.448528 |
| 10 | 1.200000 |
| 11 | 0.248528 |
Formula Used
Windowed signal: xw[n] = (x[n] - mean) × w[n], when mean removal is enabled.
Discrete Fourier Transform: X[k] = Σ xw[n] e-j2πkn/NFFT
Single-sided peak amplitude: A[k] = 2|X[k]| / (N × CG), except DC and Nyquist bins.
Double-sided peak amplitude: A[k] = |X[k]| / (N × CG)
RMS scaling: ARMS = Apeak / √2 for non-DC sinusoidal bins.
Coherent gain: CG = Σw[n] / N
Frequency bin: f[k] = k × fs / NFFT
How to Use This Calculator
- Paste or type evenly sampled signal values into the sample box.
- Enter the sampling frequency in hertz.
- Choose a window, scaling mode, and spectrum style.
- Set an FFT length or leave it blank for automatic sizing.
- Enable mean removal when you want to suppress DC offset.
- Press Calculate Spectrum to view the result section above the form.
- Review the summary cards, peak table, preview rows, and Plotly chart.
- Use the CSV and PDF buttons to download the finished report.
Frequently Asked Questions
1. What does the amplitude spectrum show?
It shows how much signal amplitude exists at each frequency bin. Strong peaks reveal dominant oscillations, harmonics, or repeated patterns hidden in the time-domain samples.
2. Why should I use a window function?
A window reduces spectral leakage when a tone does not align perfectly with an FFT bin. Hann and Hamming are common choices for cleaner peak shapes.
3. What is coherent gain?
Coherent gain corrects the amplitude reduction introduced by the selected window. Without it, windowed spectra usually underestimate sinusoid amplitudes.
4. What is the difference between single-sided and double-sided spectra?
Single-sided spectra are typically used for real signals and keep only nonnegative frequencies. Double-sided spectra display both positive and negative frequency components.
5. Why remove the mean before calculation?
Removing the mean suppresses a large DC peak caused by signal offset. This often makes nearby low-frequency components easier to inspect.
6. Does zero padding improve true frequency resolution?
Zero padding makes the plotted spectrum smoother and inserts more frequency bins. It improves visual interpolation, but it does not create new information.
7. When should I use RMS scaling?
Use RMS scaling when you want sinusoidal components expressed as RMS-equivalent amplitudes. Peak scaling is better when you want crest values directly.
8. Why is my peak slightly off the expected frequency?
Small differences come from limited record length, bin spacing, leakage, and noise. Increasing samples and selecting a suitable window usually improves peak localization.