Keeping your money safe is important, and risk-averse investors often turn to Treasury bills as one of the safest ways to invest money for short periods of time. With maturities that range from four weeks to a year, Treasury bills offer the full faith and credit of the U.S. government to back them, ensuring return of principal. However, the way that you invest in Treasury bills is different from how you'd invest in a bank certificate of deposit or a money market mutual fund. Below, you'll learn how to figure out what yield you'll be able to get when you buy a Treasury bill at a certain price.

Bid prices vs. ask prices and Treasury bill yields

Treasury bills are priced at a discount to their face value. Rather than making discrete interest payments, Treasury bills build in any interest the investor earns directly into the price of the security. For instance, if you were to buy a one-year Treasury bill that would pay you $1,000 in a year, you'd pay less than $1,000 right now.

How much less depends on prevailing rates in the Treasury bill market. However, if you know what the price that sellers are asking if you want to buy a Treasury bill from them, then you can calculate the yield if you bought it at that price.

Doing the calculation

In order to calculate the yield, start with the quoted ask price, which is typically stated in terms that assume a face value of $100. Subtract $100 minus the ask price, and then divide the difference by the ask price. This will give you the expected return, but it doesn't take into account the term of the Treasury bill. To complete the calculation, take the expected return, multiply it by 365, and then divide by the number of days until the Treasury bill matures.

For instance, for a 26-week Treasury bill priced at 99, you'd start by taking 100-99 = 1 and then dividing 1 by 99 to get 0.010101. Then, multiply that number by 365 and divide by 26 x 7 or 182 days. The net result is 0.02025, or 2.025%.

The value of having this figure is that you can compare it to yields on CDs or other investments. If the CD yields more, then you'll typically choose it over the Treasury bill. If the Treasury bill has the higher yield, then picking it over the alternative makes more sense. Either way, knowing how to do the calculation will give you more insight into market conditions and whether Treasury bills make sense in your investment portfolio.

Are you ready to learn more about stocks and how to start investing? Head over to The Motley Fool's Broker Center.

This article is part of The Motley Fool's Knowledge Center, which was created based on the collected wisdom of a fantastic community of investors. We'd love to hear your questions, thoughts, and opinions on the Knowledge Center in general or this page in particular. Your input will help us help the world invest, better! Email us at . Thanks -- and Fool on!

Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.