The time spent in the excited state is a random variable which can have any positive value but whose expectation value depends on the energy drops to lower energy unoccupied states (with the one with closest energy giving the dominant contribution). Since the drop in an isolated atom can only happen via a transfer of energy to the electromagnetic field, the actual formula results from a quantum field theory calculation involving the strength of the EM coupling constant (and would be infinite if that coupling constant were zero). But I suspect that the result turns out to be consistent with the Heisenberg uncertainty relation $#\Delta E \Delta t \gtrsim \frac{h}{4\pi}#$ and that the bound is similar for all cases of a top level excited electron in a neutral atom so that we can say the expected lifetime is inversely proportional to the energy drop to the nearest available level (and since the levels tend to get more closely spaced the higher we go this is also consistent with more highly excited states of the same atom decaying more quickly – albeit usually not directly to the initial ground state).
For more info just do a Google search for something like ‘atomic excited state lifetimes’.