Consider the problem of estimating the value of a functional $\Lambda(f)$ for $f$ an unknown density or regression function. The straightforward plug-in estimator $\Lambda(\hat f)$ with $\hat f$ a particular estimate of $f$ achieves the optimal rate of convergence in the sense of Stone over bounded subsets of a Sobolev space for a broad class of linear and nonlinear functionals. For many functionals the rate calculation depends on a Frechet-like derivative of the functional, which may be obtained using elementary calculus. For some classes of functionals, $\hat f$ is undersmoothed relative to what would be used to estimate $f$ optimally. Examples for which a plug-in estimator is optimal include $L^q$ norms of regression or density functions and their derivatives and the expected integrated squared bias. When interested in computing estimates over classes of functions which satisfy certain restrictions, such as strict positivity or boundary conditions, the plug-in estimator may or may not be optimal, depending on the functional and the function class. The functional calculus establishes conditions under which the plug-in estimator remains optimal, and sometimes suggests an appropriate modification when it does not.