A special function of a Hermitian matrix X is a function which depends only on the eigenvalues of X, λ1(X) ≥ λ2(X) ≥ . . . ≥ λn(X), and hence may be written f(λ1(X), λ2(X), . . . λn(X)) for some symmetric function f. Such functions appear in a wide variety of matrix optimization problems. We give a simple proof that this spectral function is differentiable at X if and only if the function f is differentiable at the vector λ(X), and we give a concise formula for the derivative. We then apply this formula to deduce an analogous expression for the Clarke generalized gradient of the spectral function. A similar result holds for real symmetric matrices.