Treasury bills, or T-bills, are short-term government bonds with maturities ranging from four to 52 weeks. Most Treasury bills are sold directly to institutions by the U.S. Treasury Department. Individuals can buy them if they have a Treasury Direct Legacy account. When you buy T-bills, the price is set at a discount off of the face value. When the bonds mature, you are paid face value. The interest you earn is considered ordinary income, not capital gains. Treasury bills are also marketable securities, meaning that you can buy and sell them on the secondary market. When you buy or sell T-bills on the secondary market, the price may be different and so you may realize a capital gain or loss.

Add broker’s fees or other transaction costs to the price you pay for a Treasury bill to determine your total investment. This is called your cost basis. For example, suppose you buy a T-bill with a $10,000 face value on the secondary market for $9,900 and pay $25 in transaction fees. Your cost basis is $9,925.

Adjust the cost basis when you sell a T-bill. Add any transaction costs incurred due to the sale to the cost basis. If your cost basis was $9,925 with $25 in sales fees, your cost basis is $9,950.

Subtract the total cost basis of your T-bill investment from the total proceeds of the sale. Do not include any interest earned in your sale proceeds. Interest earned on a T-bill is always ordinary income, not a capital gain. If the cost basis is greater than the sale proceeds, you have a capital loss and you’ll get a negative number when you subtract cost basis from sale proceeds. Otherwise, you have a capital gain and your answer will be a positive number.

Suppose you sell a T-bill for $10,100 and your cost basis is $9,950. You end up with a capital gain of $150.