Recent <b><sansserif>R</sansserif></b>-matrix calculations of electron impact excitation rates for transitions among the 2s22p2, 2s2p3 and 2p4 levels of FeXXI are used to derive theoretical electron density (Ne) sensitive emission-line ratios involving 2s22p2-2s2p3 transitions in the ~98-146Å wavelength range. A comparison of these with observations from the PLT tokamak plasma, for which the electron density has been independently determined, reveals generally very good agreement between theory and experiment, and in some instances removes discrepancies found previously. The observed FeXXI ratios for a solar flare, obtained with the OSO-5 satellite, imply electron densities which are consistent, with discrepancies that do not exceed 0.2dex. In addition, the derived values of Ne are similar to those estimated for the high-temperature regions of other solar flares. The good agreement between theory and observation, in particular for the tokamak spectra, provides experimental support for the accuracy of the present line-ratio calculations, and hence for the atomic data on which they are based.