Thank you for the opportunity to help you with your question!

(yield to maturity) YTM = P/ (1 + (r/k) )^(kt) where P = principal, r = annual interest rate, k = # of payments per year. t = how long the bond takes to mature.

if you say a $100 bond, then. YTM = 100 / (1 + r)^t

So if you have a 30 year zero coupon bond with $100, at 10% annual YTM, then YTM = 100/(1.1)^30 = 5.73

Please let me know if you need any clarification. I'm always happy to answer your questions.