Price a bond and compute current yield, yield to maturity and duration.
A bond's price is the present value of all future coupon payments plus the par value redemption, discounted at the required yield. When yield exceeds the coupon rate the bond trades at a discount (below par); when yield is below the coupon rate it trades at a premium. Yield to Maturity is the single discount rate that makes all future cash flows equal the current price — solving for it requires iteration. Macaulay Duration is the weighted average time to receive cash flows and measures interest rate sensitivity.
Bond price
Price = Σ [C / (1+r)^t] + F / (1+r)^n
Macaulay Duration
Duration = Σ [t × PV(cash flow at t)] / Bond Price
A bond locks in fixed coupon payments. If new bonds issue at a higher rate, your lower-coupon bond is less attractive, so its price must fall until the effective yield (YTM) matches the new market rate. The relationship is inverse and quantified by duration.
Current yield is simply the annual coupon divided by the current price — it ignores capital gain/loss at maturity. YTM accounts for the price difference from par, amortising it over the remaining life. For bonds trading at par they are equal; for discounted bonds YTM > current yield.
Duration measures interest rate risk. A bond with 7 years Macaulay Duration loses approximately 7% × Δ(yield) in price for each percentage-point rise in rates (more precisely, Modified Duration gives this sensitivity). It also equals the holding period at which price risk and reinvestment risk cancel out.
The price this calculator gives is the 'dirty' (full) price including accrued interest. In practice bonds are quoted at the 'clean' price and accrued interest is added at settlement. For most educational and financial planning purposes the dirty price is what matters.