Does the DFT calculate spectral components up to half the sampling frequency, $f_s/2$? This question is prompted by a statement made in this response (reproduced below):


  The DFT calculates spectral components up to $f_s/2$, no matter what the input signal is. 


A book I'm reading explains that the DFT of a signal $x(n)$ is the result of the inner product of $x(n)$ with each of the sampled complex sinusoidal basis vectors $s_k(n)$. Here is the author's definition of the DFT: 



The value $k$ is called the bin number and $\omega_k$ are harmonics of the sampling frequency $f_s$ (expressed in angular unit of radians, alternatively represented as $f_k = \frac{k}{N}f_s$). 

Since $k$ is taken from $0$ to $N-1$, $X(\omega_k)$ is defined up to and including $f_{N-1} = \frac{N-1}{N}f_s$. Why would Deve (answer author) say $f_s/2?$
Depends a bit on the indexing convention, but in typically you would interpret the frequency interval as $[-f_s/2, f_s/2]$ and not as $[0,f_s]$. The DFT is periodic in N so you you have

$$X(N-1) = X(-1) $$

Keep in mind that that the sampling theorem requires the signal to be band limited to $f_s/2$ so assuming that you have actual independent information about frequencies higher than $f_s/2$ is misleading. 

For real signals, it's conjugate symmetric anyway, i.e. $f_{-k} = f^*_k$ so there is only independent information on half of the spectrum anyway.