Yield to Maturity (YTM) calculates the annualised return you would get on a bond if you held it until its redemption date. It’s a handy way to compare different bonds, as it lets you see which bond might give the highest return over time, taking into account all aspects of the bond, like its price, maturity date, and face value.
You might buy the bond at a price that’s different from its face value. When the price is less than its face value, the bond is trading at a “discount”. When it’s more than its face value, it’s trading at a “premium”.
If you’re buying a bond with a maturity less than or more than a year, remember that YTM is an annualised figure. So, for example, if you have a 28-day UK Treasury Bill, you will get the annualised YTM, but only for the 28 day period between when you buy it and it matures.