Fourier Series Calculator
Select a periodic function, set the number of terms, and instantly see the Fourier coefficients plus a live graph of the partial sum approximation.
Function Settings
12π452π
1102030
Fourier Series Formula
DC Term (a0/2)
Average value of f(x) over one period.
Partial Sum Approximation
Fourier sum
Original
Coefficient Table
| n | an | bn | Amplitude |
|---|
Summary
Select a periodic function, set the number of terms, and instantly see the Fourier coefficients plus a live graph of the partial sum approximation.
How it works
- Select a periodic function from the dropdown (square wave, sawtooth, triangle wave, or rectified sine).
- Set the period L and the number of harmonics N using the sliders.
- The tool evaluates the closed-form Fourier coefficients for each harmonic index n.
- It then computes f(x) ≈ a0/2 + Σ[an cos(nπx/L) + bn sin(nπx/L)] at many sample points.
- The resulting waveform and the original ideal function are drawn on the canvas.
- The coefficient table below lists the numeric values for each term.
Use cases
- Verify hand-calculated Fourier coefficients for homework or exam prep.
- Visualize Gibbs phenomenon near discontinuities in a square wave.
- Understand how many terms are needed for a given approximation quality.
- Explore harmonic content of different periodic signals in signal processing courses.
- Generate reference values for DSP filter design exercises.
- Teach or learn the convergence behavior of Fourier series interactively.
Frequently Asked Questions
Last updated: 2026-06-10 ·
Reviewed by Nham Vu