The single polynomial analysis of ionograms is adapted to give a least-squares procedure in which the number of scaled virtual heights is greater than the number of terms in the real height expansion. More terms can then be used in the polynomial without incurring unphysical oscillations. The detail required in the real height profile is set by the number of terms independently of the number of scaled virtual heights. Any mixture of ordinary and extraordinary ray virtual heights can be used. The accuracy with which the calculated profile fits the observations is given by an rms fitting error; the accuracy can also be checked at each scaled frequency, to detect (and reject) incorrect points. The method is particularly appropriate for the analysis of topside ionograms since full use can be made of fragmentary ordinary and extraordinary ray traces. These are incorporated into a single analysis which produces a real height curve interpolating smoothly across any unobserved regions. An 8 or 10 term polynomial, fitted to 10 to 20 virtual heights, is suitable for routine work. The resulting analytic expression can give any required number of points on the real height profile.