Borrowed Funds. Borrowed funds, consisting solely of Federal Home Loan Bank advances, was $5.0 million at December 31, 2021 and June 30, 2021. Loan payments and payoffs and increases in deposits have reduced our need for borrowings to fund our operations.
Stockholders’ Equity. Total stockholders’ equity increased $814,000 or 2.5%, to $33.9 million at December 31, 2021 from $33.1 million at June 30, 2021. The increase was due primarily to net income of $1.2 million during the six months ended December 31, 2021.
Comparison of Operating Results for the Three Months Ended December 31, 2021 and 2020
General. Net income was $536,000 for the three months ended December 31, 2021, compared to $2.0 million for the three months ended December 31, 2020. The change was primarily due to a $2.3 million decrease in gain on sales of mortgage loans, offset by a $600,000 decrease in compensation and benefits expense, described in more detail below.
Interest Income. Interest income decreased $243,000, or 8.8%, to $2.5 million for the three months ended December 31, 2021 compared to $2.7 million for the three months ended December 31, 2020. Interest income on loans, which is our primary source of interest income, decreased $296,000, or 11.4%, to $2.3 million for the three months ended December 31, 2021 compared to $2.6 million for the three months ended December 31, 2020. Our annualized average yield on loans decreased 43 basis points to 4.01% for the three months ended December 31, 2021 from 4.44% for the three months ended December 31, 2020, primarily due to a decrease in market interest rates. The average balance of loans decreased $4.5 million, or 1.9%, to $229.6 million for the three months ended December 31, 2021 from $234.1 million for the three months ended December 31, 2020.
Interest Expense. Interest expense decreased $60,000, or 18.7%, to $259,000 for the three months ended December 31, 2021 compared to $319,000 for the three months ended December 31, 2020, due primarily to decreases in market interest rates and a shift in deposits from certificates of deposit to lower cost demand, savings, and NOW accounts.
Interest expense on deposits decreased $59,000, or 18.6%, to $259,000 for the three months ended December 31, 2021 from $319,000 for the three months ended December 31, 2020. Specifically, interest expense on certificates of deposit decreased $45,000, or 15.5%, to $248,000 for the three months ended December 31, 2021 from $293,000 for the three months ended December 31, 2020. The decrease resulted from a seven basis point decrease in the annualized average rate we paid on certificates of deposit to 1.40% for the three months ended December 31, 2021 from 1.47% for the three months ended December 31, 2020, reflecting a decrease in market rates. Additionally, there was an $8.5 million decrease in the average balance of certificates of deposits to $71.0 million at December 31, 2021 from $79.5 million for the three months ended December 31, 2020.
There was no interest expense on FHLB borrowings for the three months ended December 31, 2021 compared to $1,000 for the three months ended December 31, 2020. This decrease resulted from decreases in both the average balance of FHLB borrowings and the average rate we paid on FHLB borrowings. The average balance of borrowings decreased $178,000, or 3.4%, to $5.0 million for the three months ended December 31, 2021 from $5.2 million for the three months ended December 31, 2020, and the annualized average rate we paid on borrowings decreased 5 basis points to 0% for the three months ended December 31, 2021 from 0.05% for the three months ended December 31, 2020. As described above, increases in demand, savings, and NOW deposits have reduced our need for borrowings to fund our operations.
Net Interest Income. Net interest income decreased $183,000, or 7.5%, to $2.2 million for the three months ended December 31, 2021 from $2.4 million the three months ended December 31, 2020, primarily as a result of the decreased interest income from loans. In addition, our net interest rate spread decreased by 65 basis points to 2.93% for the three months ended December 31, 2021 from 3.58% for the three months ended December 31, 2020, and our net interest margin decreased by 66 basis points to 3.01% for the three months ended December 31, 2021 from 3.67% for the three months ended December 31, 2020, due to the decreases in market interest rates.
Provision for Loan Losses. Provisions for loan losses are charged to operations to establish an allowance for loan losses at a level necessary to absorb known and inherent losses in our loan portfolio that are both probable and reasonably