  A laterally confined thin elastic sheet lying on a liquid substrate displays
regular undulations, called wrinkles, characterized by a spatially extended
energy distribution and a well-defined wavelength $\lambda$. As the confinement
increases, the deformation energy is progressively localized into a single
narrow fold. An exact solution for the deformation of an infinite sheet was
previously found, indicating that wrinkles in an infinite sheet are unstable
against localization for arbitrarily small confinement. We present an extension
of the theory to sheets of finite length $L$, accounting for the experimentally
observed wrinkle-to-fold transition. We derive an exact solution for the
periodic deformation in the wrinkled state, and an approximate solution for the
localized, folded state. We show that a second-order transition between these
two states occurs at a critical confinement $\Delta_F=\lambda^2/L$.
