In this work the optical cavity of a vertical-cavity surface-emitting laser (VCSEL) is analyzed with the goal of performing a coupled electro-optical simulation of the device. For this simulation, the eigenmodes and the eigenvalues of the optical cavity have to be obtained. A common approach is to treat Maxwell's equations in the frequency domain and to solve the resulting algebraic eigenvalue equation. As an alternative, the electromagnetic problem is solved in time-domain. The response of the optical cavity is calculated by the finite-difference time-domain (FDTD) method. The optical wave propagation is modeled rigorously, including evanescent and propagating waves. From the FDTD simulation, a steady state optical intensity pattern is extracted. The eigenvalues of the dominant modes are determined using a Pade type approximation.