Lee-Yang zeros are complex values of an external control parameter at which the partition function vanishes for a many-body system of finite size. In the thermodynamic limit, the Lee-Yang zeros approach the critical value on the real-axis where a phase transition occurs. Partition function zeros have for many years been considered a purely theoretical concept, however, the situation is changing now as Lee-Yang zeros have been determined in several recent experiments. Motivated by these developments, we here devise a direct pathway from measurements of partition function zeros to the determination of critical points and universal critical exponents of continuous phase transitions. To illustrate the feasibility of our approach, we extract the critical exponents of the Ising model in two and three dimensions from the fluctuations of the total energy and the magnetization in surprisingly small lattices. Importantly, the critical exponents can be determined even if the system is away from the phase transition, for example at a high temperature. As such, our method provides an intriguing perspective for investigations of phase transitions that may be hard to reach experimentally, for instance at very low temperatures or at very high pressures.