This paper describes the mathematical basis for analysis of vertical time-of-flight (TOF) measurements with ultracold neutrons (UCN). In contrast to conventional horizontal TOF, this enables spectroscopy of UCN incident on the chopper with kinetic energies below the neutron optical potential of the detector entrance window. Much of the treatment presented here is general, and may be applied to horizontal and vertical TOF data of stationary and time-dependent spectra. Transformation rules are given for the conversion of vertical TOF spectra into other spectra of interest, and some aspects of detection efficiency are discussed that are common to all vertical TOF measurements using detectors with entrance windows. Throughout the paper, examples are provided using experimental data from measurements at the SUN-2 prototype superthermal UCN source. The technical details of these experiments and a comprehensive characterization of the source will be published by the present authors in a later paper.