#1 India's Top IT Training Institute
×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
Mentors

Mentors

Meet the industry experts who train and guide you through your course.

Read More →
Free Resources

Free Resources

Free tutorials, interview questions, tools and calculators to help you learn.

Explore →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
⚡ FREE · STEP-BY-STEP

DFT / FFT Calculator: X[k] Step by Step

Enter x[n] and see the DFT term by term, the radix-2 FFT stages and the magnitude spectrum.

  • 🌀 Twiddle factors Wₙᵏ
  • 🦋 Radix-2 butterfly stages
  • 📊 Magnitude and phase table

How to use the DFT / FFT Calculator

  1. 1. Enter the samplesFor example 1, 2, 3, 4. Complex values like 1+2j are fine.
  2. 2. Pick DFT or IDFTAdd N to zero-pad, for example to 8 points.
  3. 3. CalculateSee X[k] term by term, the FFT stages, the Parseval check and a plot.

DFT and the radix-2 FFT

The N-point DFT is X[k] = Σ x[n]·W_N^(kn) with the twiddle factor W_N = e^(−j2π/N), for k = 0 … N − 1. The inverse is x[n] = (1/N)Σ X[k]·W_N^(−kn). Computing it directly takes N² complex multiplications. The radix-2 decimation-in-time FFT splits the input into even and odd samples (bit-reversed order) and combines them in log₂N stages of butterflies, which needs only (N/2)·log₂N multiplications.

Worked example: x[n] = {1, 2, 3, 4} and W₄ = −j. X[0] = 10, X[1] = 1 − 2j − 3 + 4j = −2 + 2j, X[2] = 1 − 2 + 3 − 4 = −2 and X[3] = −2 − 2j. In the FFT, the bit-reversed input is 1, 3, 2, 4. Stage 1 gives 4, −2, 6, −2 and stage 2 gives 10, −2 + 2j, −2, −2 − 2j.

Exam tips

  • Powers of W repeat every N. Reduce kn mod N before you multiply.
  • For real x[n], X[N − k] is the complex conjugate of X[k], so you only need about half the bins.
  • X[0] is the sum of all the samples, which is a quick check.
  • Zero-padding gives a finer frequency grid but no new information. Bin k is the frequency k·fs/N.

Frequently asked questions

What is the maximum length?

Up to 1024 points. The full term-by-term working is shown for N ≤ 8 and the butterfly stages for N ≤ 16.

Can I enter complex samples?

Yes: 1+2j, -j, 3∠90 and similar forms all work, for both the DFT and the inverse DFT.

Why do I see tiny numbers like 1e-16 in other tools but not here?

Rounding errors from floating-point maths are cleaned up, so exact zeros show as 0.

Is this tool free?

Yes. You fill in a short form once to see your result, and the other Uncodemy tools then open without it. All the maths runs in your browser.

More free tools

See all free tools