The theoretical computation of the travel times of seismic waves in isotropic heterogeneous media is a difficult task. Analytic results are only known for some specific velocity models of the medium. The central idea in this paper is application of Lie group theory of conformal transformations of Euclidean 2D and 3D spaces to find an analytic formula for travel times of seismic waves in isotropic heterogeneous media. Furthermore, the known relationship between the travel-time integral resulting from Fermat’s principle and length of geodesics on Riemannian manifold is utilized. Analytic travel-time calculation is a very important subject in seismological investigations. The presented method can be very helpful in evaluating the quality of seismic tomography and seismic ray-tracing algorithms because one can compare numerical and analytic results. Moreover, the presented theory can have other applications as well.