Atomic data have been calculated for Fe XXI, and the theoretical intensity ratios for many transitions are tabulated. Fe XXI lines in wavelength regions 1-25 A, 90-200 A, and 300-2500 A are discussed with reference to presently available solar and laboratory spectra. It is found that Fe XXI is an excellent density diagnostic for solar-flare and tokamak plasmas, when densities are in the range from 10 to the 11th to 10 to the 15th per cu cm. The theoretical calculations are applied to flare spectra obtained from OSO 5, and an electron density of less than 10 to the 13th per cu cm is deduced for a temperature of 10,000,000 K. The results are somewhat ambiguous in several cases because of the limited spectral and temporal resolution of these earlier spectrometers. However, the calculations will be important for forthcoming solar projects, such as the Solar Maximum Mission.