I have read many articles about DTFT and DFT but am not able to discern the difference between the two except for a few visible things like DTFT goes till infinity while DFT is only till $N-1$. Can anyone please explain the difference and when to use what? Wiki says

The DFT differs from the discrete-time Fourier transform (DTFT) in that its input and output sequences are both finite; it is therefore said to be the Fourier analysis of finite-domain (or periodic) discrete-time functions.

Is it the only difference?

Edit: This article nicely explains the difference

  • 9
    $\begingroup$ The DTFT is a continuous function of frequency, but the DFT is a discrete function of frequency. $\endgroup$
    – John
    Commented May 29, 2014 at 11:09
  • 1
    $\begingroup$ The key point is , DFT is sampled version of DFT and the rate is the length of DFT $\endgroup$
    – nmxprime
    Commented Nov 2, 2014 at 3:17
  • 1
    $\begingroup$ @nmxprime You mean DFT is sampled version of DTFT? $\endgroup$
    – endolith
    Commented Aug 28, 2016 at 16:51
  • 1
    $\begingroup$ @endolith Yes.it is $\endgroup$
    – nmxprime
    Commented Sep 3, 2016 at 7:37
  • 1
    $\begingroup$ @AdityaP You are right, there is a mistake there. But overall, a very interesting and insightful article. $\endgroup$ Commented Feb 23, 2021 at 7:33

5 Answers 5


The discrete-time Fourier transform (DTFT) is the (conventional) Fourier transform of a discrete-time signal. Its output is continous in frequency and periodic. Example: to find the spectrum of the sampled version $x(kT)$ of a continous-time signal $x(t)$ the DTFT can be used.

The discrete Fourier transform (DFT) can be seen as the sampled version (in frequency-domain) of the DTFT output. It's used to calculate the frequency spectrum of a discrete-time signal with a computer, because computers can only handle a finite number of values. I would argue against the DFT output being finite. It is periodic as well and can therefore be continued infinitely.

To sum it up:

                DTFT                | DFT
       input    discrete, infinite  | discrete, finite *)
       output   contin., periodic   | discrete, finite *)

*) A mathematical property of the DFT is that both its input and output are periodic with the DFT length $N$. That is, although the input vector to the DFT is finite in practice, it's only correct to say that the DFT is the sampled spectrum if the DFT input is thought to be periodic.

  • 1
    $\begingroup$ did you not mean that the DTFT input is infinite? $\endgroup$ Commented May 29, 2014 at 11:15
  • $\begingroup$ @LutzL It can be infinite in general, yes. I'll change that. What about the DFT output: would you rather call it finite or periodic? $\endgroup$
    – Deve
    Commented May 29, 2014 at 11:22
  • $\begingroup$ i think output of DFT is N-periodic, finite sequence $\endgroup$
    – BaluRaman
    Commented May 29, 2014 at 11:27
  • 1
    $\begingroup$ In the DFT, much depends on interpretation. From the technical point of view, it transforms finite to finite. From the point of view that it computes the coefficients of a trigonometric polynomial, one might say that it transforms infinite discrete periodic to finite. But one can shift the window of frequencies used to represent the input, and the amplitudes over all possible frequencies form again a periodic sequence. $\endgroup$ Commented May 29, 2014 at 11:38
  • 1
    $\begingroup$ To be more consistent I would put "periodic" instead of "finite" for the input of the DFT. This is a direct consequence of the DFT (output) being discrete. $\endgroup$
    – Matt L.
    Commented May 29, 2014 at 14:10

Alright, I'm gonna answer this with an argument that "opponents" to my rigid nazi-like position regarding the DFT have.

First of all, my rigid, nazi-like position:

The Discrete Fourier Transform and Discrete Fourier Series are one-and-the-same.

The DFT maps one infinite and periodic sequence, $x[n]$ with period $N$ in the "time" domain to another infinite and periodic sequence, $X[k]$, again with period $N$, in the "frequency" domain. And the iDFT maps it back. and they're "bijective" or "invertible" or "one-to-one".

DFT: $$ X[k] = \sum\limits_{n=0}^{N-1} x[n] e^{-j 2 \pi nk/N} $$

iDFT: $$ x[n] = \frac{1}{N} \sum\limits_{k=0}^{N-1} X[k] e^{j 2 \pi nk/N} $$

That is most fundamentally what the DFT is. It is inherently a periodic or circular thing.

$$ x[n+N]=x[n] \qquad \forall n \in \mathbb{Z} $$ $$ X[k+N]=X[k] \qquad \forall k \in \mathbb{Z} $$

But the periodicity deniers like to say this about the DFT. It is true, it just doesn't change any of the above.

So, suppose you had a finite-length sequence $x[n]$ of length $N$ and, instead of periodically extending it (which is what the DFT inherently does), you append this finite-length sequence with zeros infinitely on both left and right. So

$$ \hat{x}[n] \triangleq \begin{cases} x[n] \qquad & \text{for } 0 \le n \le N-1 \\ \\ 0 & \text{otherwise} \end{cases} $$

Now, this non-repeating infinite sequence does have a DTFT:

DTFT: $$ \hat{X}\left(e^{j\omega}\right) = \sum\limits_{n=-\infty}^{+\infty} \hat{x}[n] e^{-j \omega n} $$

$\hat{X}\left(e^{j\omega}\right)$ is the Z-transform of $\hat{x}[n]$ evaluated on the unit circle $z=e^{j\omega}$ for infinitely many real values of $\omega$. Now, if you were to sample that DTFT $\hat{X}\left(e^{j\omega}\right)$ at $N$ equally spaced points on the unit circle, with one point at $z=e^{j\omega}=1$, you would get

$$ \begin{align} \hat{X}\left(e^{j\omega}\right)\Bigg|_{\omega = 2 \pi\frac{k}{N}} & = \sum\limits_{n=-\infty}^{+\infty} \hat{x}[n] e^{-j \omega n} \Bigg|_{\omega = 2 \pi\frac{k}{N}} \\ & = \sum\limits_{n=-\infty}^{+\infty} \hat{x}[n] e^{-j 2 \pi k n/N} \\ & = \sum\limits_{n=0}^{N-1} \hat{x}[n] e^{-j 2 \pi k n/N} \\ & = \sum\limits_{n=0}^{N-1} x[n] e^{-j 2 \pi k n/N} \\ & = X[k] \\ \end{align} $$

That is precisely how the DFT and DTFT are related. Sampling the DTFT at uniform intervals in the "frequency" domain causes, in the "time" domain, the original sequence $\hat{x}[n]$ to be repeated and shifted by all multiples of $N$ and overlap-added. That's what uniform sampling in one domain causes in the other domain. But, since $\hat{x}[n]$ is hypothesized to be $0$ outside of the interval $0 \le n \le N-1$, that overlap-adding does nothing. It just periodically extends the non-zero part of $\hat{x}[n]$, our original finite-length sequence, $x[n]$.

  • 4
    $\begingroup$ The accepted answer was good, but I found your answer to be more insightful. Thank you for providing the actual mathematical connection between the DTFT and DFT... especially the sampling of the spectra causing periodicity in the time-domain. That is a point I always forget. $\endgroup$
    – rayryeng
    Commented Feb 5, 2015 at 16:40
  • $\begingroup$ Your second paragraph seems to imply that DFTs accept input sequences that are infinite in length. Has anyone ever performed an infinite-length DFT? $\endgroup$ Commented May 22, 2015 at 11:28
  • $\begingroup$ hey Rick, it's good to see you here from comp.dsp. i remember being greeted by @PeterK when i first sorta migrated over (but i will never leave comp.dsp). anyway, to the same degree that the DFS accepts an input sequence of infinite length is the degree that the DFT accepts an input that is of infinite length. all's i'm saying is that the DFT and the DFS are one-and-the-same. $\endgroup$ Commented May 22, 2015 at 14:46
  • 1
    $\begingroup$ @robert bristow-johnson. this was a beautiful explanation. my question may be bad but, by discrete fourier series, you are referring to the case where the input is a continuous periodic function that goes on infinitely in both directions, correct ? From what I remember say, from reading george silov's dover book, if you make the number of fourier coefficients large enough by using a fine enough grid of frequencies, then the fourier series can reproduce a period continuous function arbitrarily closely. this is the fs you're referring to, when you say they it is the same as DFT, correct ? thx. $\endgroup$
    – mark leeds
    Commented Oct 26, 2017 at 6:52
  • $\begingroup$ by Discrete Fourier Series, i mean the same thing as the DFT and iDFT definitions shown in the answer: $$ X[k] = \sum\limits_{n=0}^{N-1} x[n] e^{-j 2 \pi nk/N} $$ $$ x[n] = \frac{1}{N} \sum\limits_{k=0}^{N-1} X[k] e^{j 2 \pi nk/N} $$ and, for both $x[n]$ and $X[k]$, they are periodic with a period $N$: $$ x[n+N] = x[n] \qquad \forall n \in \mathbb{Z} $$ $$ X[k+N] = X[k] \qquad \forall k \in \mathbb{Z} $$ and $N$ is a positive integer. that's all i mean by the DFS. $\endgroup$ Commented Oct 26, 2017 at 8:22

If we were to compute a continuous DTFT, sample one cycle of it uniformly, and perform an inverse DFT, we would obtain one cycle of a periodic summation of the original infinite, aperiodic time sequence. Conversely, if we were to compute one cycle of a periodic summation of the original infinite, aperiodic time sequence, and perform a DFT, we would obtain samples of one cycle of the continuous DTFT.

  • 2
    $\begingroup$ Welcome to the site, Bob K! :) $\endgroup$ Commented Aug 24, 2020 at 18:17

If I am correct, even if DFT input is periodic, although the number of samples is finite, the mathematics behind it treats it as an infinite sequence which periodically commences the N samples after its termination. Please correct me if I am wrong.

  • $\begingroup$ some at comp.dsp that i've had arguments with might "correct" you, but they're wrong. there is no difference between the DFT and the Discrete Fourier Series. none whatsoever. $\endgroup$ Commented Nov 1, 2014 at 15:36
  • $\begingroup$ To help me understand what's being said here, I have a question regarding the output of the operation you call a "Discrete Fourier series". Is that output a sequence of numbers or a continuous function (an equation)? $\endgroup$ Commented May 22, 2015 at 12:04

Since DTFT output is continuous, it can not be processed with computers. So we have to convert this continuous signal into discrete form. It is nothing but DFT as a further advancement on FFT to reduce calculations.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.