Fourier Series Calculator
CalculusFreeNo sign-up
A Fourier series writes a periodic function as a sum of sines and cosines. On [−π, π], has , so x = 2(sin x − ½ sin 2x + ⅓ sin 3x − …).
Type the problems from this lesson and check each step.
Type pi for the interval [−π, π].
The function repeated with period 2L (gray) and the partial sum (green). Jumps cause the Gibbs overshoot.
| a₀ | 0 |
| n = 1: aₙ, bₙ | 0, 2 |
| n = 2: aₙ, bₙ | 0, −1 |
| n = 3: aₙ, bₙ | 0, 0.6666667 |
| n = 4: aₙ, bₙ | 0, −0.5 |
| n = 5: aₙ, bₙ | 0, 0.4 |
| n = 6: aₙ, bₙ | 0, −0.3333333 |
| n = 7: aₙ, bₙ | 0, 0.2857143 |
| n = 8: aₙ, bₙ | 0, −0.25 |
| Root-mean-square error of the 10-term sum | 0.43627 |
Show steps
- On , .
- (f is odd, so all cosine terms vanish)
How to use the Fourier series calculator
- Enter f(x), or choose piecewise and enter the formula on each half.
- Enter the half-period L (pi for [−π, π]).
- Choose how many terms to draw. Press Compute to see the coefficient formulas, a table of values and the graph.
Fourier coefficient formulas
Useful facts: and .
Even and odd functions
An odd function (like x or the square wave) has only sine terms: all . An even function (like x² or |x|) has only cosine terms: all . Checking symmetry first halves the work.
Worked example: square wave
f = −1 on (−π, 0) and 1 on (0, π). It is odd, so and , which is for odd n and 0 for even n: . Near the jumps the partial sums overshoot by about 9% (the Gibbs phenomenon).
Fourier series practice quiz: 10 questions
Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.
Quiz complete
Frequently asked questions
What is a Fourier series?
A way to write a periodic function as a constant plus an infinite sum of sines and cosines with frequencies that are whole-number multiples of a base frequency.
How are the coefficients calculated?
By integrating f(x) times cos(nπx/L) or sin(nπx/L) over one period and dividing by L.
Can I enter a piecewise function?
Yes, with one formula on (−L, 0) and another on (0, L), which covers square waves, triangle waves and half-wave functions.
Why are the formulas sometimes not shown?
When nerdamer cannot find a closed form that passes the numerical check for n = 1 to 6, the calculator shows the numerical coefficients instead.
What do the partial sums show?
They show how adding more terms makes the series approach the function, and the overshoot (Gibbs phenomenon) near jumps.
Sources
- Paul’s Online Math Notes: Fourier Series
- MIT OpenCourseWare 18.03: Differential Equations
- NIST Digital Library of Mathematical Functions §1.8: Fourier Series
Related calculators
- Integral Calculator
- Taylor Series Calculator
- Series Convergence Calculator
- Laplace Transform Calculator
- Trigonometry Calculator
More calculus calculators
Related to This Article
More math articles
- Pennsylvania PSSA Grade 6 Math Free Worksheets: Free Printable PDF Worksheets for Every Skill
- High-Yield Savings Calculator
- Dew Point Calculator
- How to Graph the Tangent Function?
- Praxis 8003 vs 5003: Check the Code and Reuse the Right Math Topics (2027 Prep)
- The Math Behind Slot Machines: Randomness, RTP, and Volatility
- The Ultimate SAT Math Course (+FREE Worksheets & Tests)
- How to Build a Personal Budget: Step-by-Step (2027)
- Converting Units of Weight/Mass for 4th Grade
- Zeroing In: The Art of How to Divide Numbers Ending with a Zero












What people say about "Fourier Series Calculator - Effortless Math"?
No one replied yet.