Deposits increased $28.7 million, or 4.7%, to $635.3 million at June 30, 2023, from $606.6 million at June 30, 2022. The increase in deposits was primarily due to a $36.7 million increase in money market accounts and a $28.0 million increase in time deposit accounts, partially offset by a $15.2 million decrease in savings accounts, a $14.3 million decrease in non-interest bearing checking accounts and a $6.0 million decrease in interest bearing checking accounts. The interest rate environment has created a highly competitive market for deposits.
Borrowings decreased $31.0 million, or 47.7%, to $34.0 million at June 30, 2023, from $65.0 million at June 30, 2022. During the year ended June 30, 2023, the Company used cash from the increase in deposits to pay off a portion of short-term borrowings.
Stockholders’ equity decreased $31.6 million, or 16.4%, to $160.7 million at June 30, 2023, from $192.3 million at June 30, 2022. The decrease in stockholders’ equity was primarily due to the repurchase of 2,413,535 shares at a total cost of $26.7 million, or $11.07 per share, during the year ended June 30, 2023 under the Company’s previously announced stock repurchase programs, as well as the payment of a $0.03 per share quarterly cash dividend in August 2022, November 2022, February 2023 and May 2023 totaling $1.6 million, and a $8.0 million increase in the accumulated other comprehensive loss component of equity related to the unrealized loss on available for sale securities. These decreases to stockholders’ equity were partially offset by $2.8 million of net income during the year ended June 30, 2023. Book value per share measured $12.91 as of June 30, 2023 and as of June 30, 2022, respectively, and tangible book value per share(4) measured $12.48 as of June 30, 2023, compared to $12.54 as of June 30, 2022.
Net Interest Income
For the quarter ended June 30, 2023, net interest income was $5.3 million, a decrease of $951 thousand, or 15.3%, from the quarter ended June 30, 2022. The decrease in net interest income was primarily due to an increase in interest expense on deposits and borrowings, partially offset by an increase in interest income on loans and investments. The net interest margin measured 2.73% for the quarter ended June 30, 2023, compared to 3.20% for the quarter ended June 30, 2022. The decrease in the net interest margin during the quarter ended June 30, 2023, compared to the same period in 2022 was primarily due to an increase in the average balance of deposits and borrowings and the rise in interest rates that caused an increase in the cost of borrowings and deposits that exceeded the increase in interest income on loans and investments.
For the year ended June 30, 2023, net interest income was $23.1 million, an increase of $87 thousand, or 0.4%, from the year ended June 30, 2022. The increase in net interest income was primarily due to an increase in interest income on loans and investments, partially offset by an increase in interest expense on deposits and borrowings. The net interest margin measured 2.97% for the year ended June 30, 2023, compared to 3.02% for the year ended June 30, 2022. The decrease in the net interest margin during the year ended June 30, 2023, compared to the same period in 2022 was primarily due to an increase in the average balance of deposits and borrowings and the rise in interest rates that caused an increase in the cost of borrowings and deposits, partially offset by an improvement in asset mix during the year ended June 30, 2023, including a $62.4 million decrease in the average balance of other interest-earnings assets, including cash, and a $22.6 million increase in the average balance of net loans.
Non-interest Income
For the quarter ended June 30, 2023, non-interest income totaled $592 thousand, an increase of $201 thousand, or 51.4%, from the quarter ended June 30, 2022. The increase was primarily due to a $171 thousand decrease in the unrealized loss on equity securities and a $20 thousand increase in earnings on bank-owned life insurance.
For the year ended June 30, 2023, non-interest income totaled $2.0 million, a decrease of $125 thousand, or 6.0%, from the year ended June 30, 2022. The decrease was primarily due to a $387 thousand increase in the unrealized loss on equity securities and a decrease in rental income consistent with the sale of properties during the fiscal year ended June 30, 2023. These decreases to non-interest income were partially offset by a $398 thousand net gain on the sale of premises and equipment primarily associated with the sale of three properties securities with a total carrying value of $1.9 million recorded during the year ended June 30, 2023.
Non-interest Expense
For the quarter ended June 30, 2023, non-interest expense totaled $5.2 million, a decrease of $40 thousand, or 0.8%, from the quarter ended June 30, 2022. The decrease in non-interest expense was primarily due to $187 thousand of prepayment penalties associated with the prepayment of $20.0 million of advances from the FHLB of Pittsburgh during the quarter ended June 30, 2022 and a $199 thousand decrease in professional fees primarily due to a decrease in legal expenses. These decreases to non-