|9 Months Ended
Mar. 31, 2022
|Investments, Debt and Equity Securities [Abstract]
The amortized cost and fair value of marketable securities as of the dates indicated below were as follows:
(1) Unrealized gains on equity securities included in our portfolio include the initial fair value adjustment recorded upon a security becoming marketable.
(2) Time deposits excluded from fair value measurements.
Our investment portfolio includes both corporate and government securities that have a maximum maturity of three years. The longer the duration of these securities, the more susceptible they are to changes in market interest rates and bond yields. As yields increase, those securities with a lower yield-at-cost show a mark-to-market unrealized loss. Most of our unrealized losses are due to changes in market interest rates and bond yields. We believe that we have the ability to realize the full value of all of these investments upon maturity. As of March 31, 2022, we had 543 investments in a gross unrealized loss position. Our investments that were in a continuous loss position of 12 months or more, as well as the unrealized losses on those investments, were immaterial. The following table summarizes the fair value and gross unrealized losses of our investments that were in an unrealized loss position as of the date indicated below.
The contractual maturities of securities classified as available-for-sale, regardless of their classification on our Condensed Consolidated Balance Sheets, as of the date indicated below were as follows:
Actual maturities may differ from contractual maturities because borrowers may have the right to call or prepay obligations with or without call or prepayment penalties. Realized gains and losses on available-for-sale securities for the three and nine months ended March 31, 2022 and 2021 were immaterial.