This formula can be directly applied only to hydrogen-like, also called hydrogenic atoms of chemical elements, i.e. atoms with only one electron being affected by an effective nuclear charge (which is easily estimated). Examples would include He, Li, Be etc., where no other electrons exist in the atom.