A novel and general method to quickly obtain frequency-domain solutions based on one or a few time-domain solutions is presented. The time-domain solution of electromagnetic field is found by using either two-dimensional (2-D) or three-dimensional (3-D) finite-element methods (FEM). The time-domain FEM is first used to obtain a solution for step function excitations by taking into account all the necessary initial conditions. Then, based on time-domain convolution theorem and the principle of integration by parts, a numerical algorithm to find the solutions of any excitations, without additional FEM computation, is deduced. A typical, interesting and meaningful application is to obtain the frequency-domain solutions when sweeping the operating frequency over a wide range. In this paper, a problem involving the finding of the resonant frequency of a copper loop connected with a pair of parallel plates using 3-D FEM is used as an illustrative example. The numerical experiment shows that the proposed method can reduce the computing time effectively and readily as it is easy to adjust the time step size in time-domain FEM.