Macaulay duration
Macaulay duration is the present-value-weighted average wait for a bond's remaining cash flows, measured in years. Coupons pull that average in before maturity.
A bond pays coupons along the way and face at the end. Macaulay duration is the average of those dates, each weighted by the present value of that cash flow as a share of the price. The unit is years. Coupons pull some of the weight forward, so duration lands before maturity. A zero-coupon bond has no coupons to pull, so its Macaulay duration equals its remaining life. Saying a bond has duration without the unit is how it gets mixed up with modified duration, which is also in years but answers a different question.
The identity is . Modified duration is that wait adjusted for compounding, , and it is the percent the price moves when the yield moves by one percentage point, for a small move. DV01 scales the same idea to one basis point. The bond duration calculator reports all three. Premium bonds have shorter duration than par bonds of the same maturity, because more of the value sits in the coupons.
Duration compares interest-rate risk across bonds that do not share a maturity. It is not a forecast of what yields will do, and it is not credit risk: a short-duration bond can still default tomorrow. Immunisation matches Macaulay duration to a liability date. Hedge ratios use modified duration. Mixing the two skips the factor. The bond price calculator is the price identity; duration is the sensitivity of that identity.