Analyze signals with harmonics and numerical integration. Review coefficients, amplitudes, phases, errors, and wave reconstructions. Export results quickly for study, checking, reporting, and reuse.
The following example represents one period of a simple square-wave style input with T = 1. This is also the default sample set.
| Index | x | y |
|---|---|---|
| 1 | 0.000 | 1 |
| 2 | 0.125 | 1 |
| 3 | 0.250 | 1 |
| 4 | 0.375 | 1 |
| 5 | 0.500 | -1 |
| 6 | 0.625 | -1 |
| 7 | 0.750 | -1 |
| 8 | 0.875 | -1 |
For a periodic signal with period T, the calculator estimates the Fourier series coefficients numerically from the supplied samples.
a₀ = (2/T) ∫ f(x) dx
aₙ = (2/T) ∫ f(x) cos(2πnx/T) dx
bₙ = (2/T) ∫ f(x) sin(2πnx/T) dx
fN(x) = a₀/2 + Σ[aₙ cos(2πnx/T) + bₙ sin(2πnx/T)]
The amplitude for harmonic n is √(aₙ² + bₙ²). The phase is atan2(bₙ, aₙ). Because entered samples may be discrete rather than symbolic, the calculator applies the trapezoidal rule across the supplied period to estimate each integral.
It returns a₀, each aₙ and bₙ coefficient, amplitude, phase, reconstructed values, and the root mean square reconstruction error for the selected harmonic count.
Yes. In Y-Only mode, the calculator assumes those values are evenly spaced across one full period. It automatically builds the matching x-grid.
Yes. Choose X,Y mode and paste one x,y pair per line. Every x-value must stay within 0 and the chosen period.
More samples usually improve the numerical integration estimate. Sparse or irregular samples can miss waveform details and shift the estimated harmonic content.
Start with a small value like 5 or 10. Increase it when you want a closer reconstruction. More harmonics usually improve detail but can emphasize sharp transitions.
The phase shows the angular shift for each harmonic component. It helps describe where that sinusoidal term is positioned relative to the start of the period.
The signal may need more harmonics, more samples, or both. Numerical integration and abrupt waveform changes also create approximation error.
Yes. After calculation, use the CSV button for spreadsheet-friendly output and the PDF button for a compact report you can save or share.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.