Ideality factors are used to identify the dominant form of recombination in many types of solar cells and guide future development. Unusual noninteger and voltage-dependent ideality factors, which are difficult to explain using the classical diode theory, have been reported for perovskite solar cells and remain unexplained. Experimental measurements and theoretical simulations of the electric potential profile across a planar perovskite solar cell show that significant potential drops occur across each of the perovskiteand transport-layer interfaces. Such potential profiles are fundamentally distinct from the single potential drop that characterizes a p-n or a p-in junction. We propose an analytical model, developed specifically for perovskite devices, in which the ideality factor is replaced by a systematically derived analog, which we term the ectypal factor. In common with the classical theory, the ectypal diode equation is derived as an approximation to a drift-diffusion model for the motion of charges across a solar cell, however, crucially, it incorporates the effects of ion migration within the perovskite absorber layer. The theory provides a framework for analyzing the steady-state performance of a perovskite solar cell (PSC) according to the value of the ectypal factor. Predictions are verified against numerical simulations of a full set of drift-diffusion equations. An important conclusion is that our ability to evaluate PSC performance, using standard techniques such as the analysis of dark J-V or Suns-V OC measurements, relies on understanding how the potential distribution varies with applied voltage. Implications of this work on the interpretation of data from the literature are discussed.