We developed a general numerical method to calculate the spontaneous emissi
on lifetime in an arbitrary microcavity, using a finite-difference time-dom
ain algorithm. For structures with rotational symmetry we also developed a
more efficient but less general algorithm. To simulate an open radiation pr
oblem, we use absorbing boundaries to truncate the computational domain. Th
e accuracy of this method is limited only by numerical error and finite ref
lection at the absorbing boundaries. We compare our result with cases that
can be solved analytically and find excellent agreement. Finally, we apply
the method to calculate the spontaneous emission lifetime in a slab wavegui
de and in a dielectric microdisk, respectively. (C) 1999 Optical Society of
America [S0740-3224(99)00403-8]. OCIS codes: 000.4430, 230.3990, 270.5580.