Predicting freefall time is a major problem in galactic dynamics. The relaxation time of collisionless dark matter, which heavily influences galaxy evolution, is closely related to its freefall time. Calculating freefall time using Kepler’s Third Law does not consider the effects of the universe’s expansion. This paper proposes a new formula for calculating freefall time in an expanding background. The derivation of the formula starts from the governing equations of an N-body system in an expanding background. Two-body simulations were run using equations of motion with constant damping (to represent the effects of expansion) derived from the N-body equations. More than 5,200 different two-body systems with different separation distances, mass, and damping were simulated. The simulated freefall time was compared with good agreement against the proposed formula. The results demonstrate that two-body freefall time is dependent on the time at which collapse began. The earlier it began, the longer the freefall time. A weak gravitational attraction, caused by the small mass of the system or the great distances involved, exacerbates this effect. The galaxy that started to form earlier is expected to take longer to form. A better understanding of freefall time can lead to greater insight into galaxies’ historical and future evolution.