In the 1980s, Gross and Zagier obtained a formula expressing the heights of CM points on modular curves in terms of derivatives of certain L-functions, leading to applications towards the Birch and Swinnerton-Dyer conjecture for elliptic curves. In this talk, I will present a formula for the heights of certain algebraic cycles first introduced by Bertolini, Darmon, and Prasanna. This formula generalizes the Gross-Zagier formula to higher dimensions and has applications to the Beilinson-Bloch-Kato conjectures, notably in the case of Jacobians with CM. This is joint work with Ari Shnidman.