New calculations of the theoretical electron-density-sensitive emission-line ratio R = I(2s2p P-1-2p(2) D-1)/I(2s(2) S-1-2s2p P-3(1)) = I(1371.29 Angstrom)/I(1218.35 Angstrom) in O v are presented, which are significantly different from those deduced previously, principally due to the adoption of improved atomic data in the present analysis. Electron densities estimated from the current diagnostics, in conjunction with observed values of R measured from solar spectra obtained by the S082B spectrograph on board Skylab and by the High Resolution Telescope and Spectrograph (HRTS) on board a sounding rocket flight, are found to be in good agreement with densities determined from Line ratios in species formed at similar electron temperatures to O v, such as O IV and N IV. These results provide experimental support for the accuracy of the diagnostic calculations presented in this paper, and hence the atomic data used in their derivation. The observed value of R for the M0Ve flare star AU Mic, determined from observations made by the Goddard High Resolution Spectrometer on board the Hubble Space Telescope, is within 4 per cent of the expected low-density limit, implying that log N-e less than or equal to 10.4 for the O v emitting region of the AU Mic atmosphere. This is similar to density estimates made for AU Mic using other methods.