An exact analytical expression for the bending angle of light due to a non-rotating massive object, considering the actual distances from source and observer to the gravitational mass, is derived. Our novel formula generalizes Darwin’s well-known equation for gravitational light bending [Proc. R. Soc. London A 263, 39-50 (1961)], where both source and observer are placed at infinite distance from the lensing mass, and provides excellent results in comparison with the post-Newtonian (PPN) formalism up to first order. As a result, the discrepancy between our recent expression and the PPN approach is 6.6 mas for sun-grazing beams coming from planet Mercury, with significant differences up to 2 mas for distant starlight. Our findings suggest that these considerations should not be dismissed for both solar system objects and extragalactic sources, where non-negligible errors might be present in ultraprecise astrometry calculations.