The collapse of an empty spherical bubble in an ideal liquid, in the absence of viscosity and surface tension, was studied by Lord Rayleigh. Using energy conservation, he derived an exact expression for the total collapse time as a function of the initial radius of the bubble, the density of the liquid, and the far-field pressure. In the present work, we extend Rayleigh's expression to include surface tension effects. Results are found to depend on a dimensionless parameter ϵ that measures the ratio between the work done by surface tension and that done by pressure during the collapse. This parameter is small for large bubbles but can be of order unity or larger for bubbles of small radius and, eventually, small pressure. We show that the ratio between the collapse time in the presence of surface tension and Rayleigh's collapse time is proportional to a definite integral that is a smooth, monotonically decreasing function of ϵ. This function can be easily bounded analytically for any value of ϵ, yielding a simple and accurate approximation for the collapse time that, for all practical purposes, provides a complete analytical solution to the problem at hand. We finally extend results to the case of a hyperspherical collapsing empty bubble.