Interest Expense. Total interest expense increased $629,000, or 140.4%, to $1.1 million for the three months ended June 30, 2024, compared to $448,000 for the same period in 2023. Interest expense on deposits was $771,000 during the three months ended June 30, 2024, up $391,000, or 102.9%, compared to the same period in 2023. The average rate paid on interest-bearing deposits was 2.16% during the three months ended June 30, 2024, up 103 basis points compared to the same period in 2023. Interest expense on borrowings increased by $238,000 during the three months ended June 30, 2024 compared to the same period in 2023 mainly due to interest expense on BTFP advances.
Net Interest Income. Net interest income was $2.4 million for the three months ended June 30, 2024, up $574,000, or 30.6%, compared to 2023. Our interest rate spread was 2.85% and 2.44% for the three months ended June 30, 2024 and 2023, respectively. Our net interest margin was 3.72% and 2.97% for the three months ended June 30, 2024 and 2023, respectively. The increase in net interest margin and net interest income over the comparable periods was primarily the result of increased yields on our interest-earning assets, partially offset by the rising cost of interest-bearing liabilities.
Provision for Credit Losses. The total provision for credit losses on loans and unfunded commitments was $99,000 for the three months ended June 30, 2024, compared to no provision for the same period in 2023. In 2024, the provision for credit losses was largely attributable to commercial loan growth and an increase in the allowance for credit losses on individually evaluated residential loans.
Non-interest Income. Non-interest income for the three months ended June 30, 2024 totaled $366,000, up $49,000 or 15.5% compared to the same period in 2023. Non-interest income for the three months ended June 30, 2024 includes $46,000 related to insurance proceeds received due to storm damage.
Non-interest Expense. Non-interest expense totaled $2.1 million for the three months ended June 30, 2024, down $123,000, or 5.6%, compared to the three months ended June 30, 2023. During the first three months of 2024, the Company upgraded to a new core processing system which largely contributed to reductions in data processing and communication expenses and ATM and debit card expenses during the three months ended June 30, 2024.
Data processing and communication expense totaled $133,000 for the three months ended June 30, 2024, down $87,000 or 39.5% compared to the same period in 2023. ATM and debit card expense totaled $36,000 for the three months ended June 30, 2024, down $25,000 or 41.0% compared to the same period in 2023.
Income Tax Expense. The Company reported an income tax expense of $120,000 for the three months ended June 30, 2024 compared to an income tax benefit of $16,000 for the three months ended June 30, 2023. The change in income taxes over the comparable prior period was largely due to the change in taxable earnings over the comparable periods.
Comparison of Results of Operations for the Six Months Ended June 30, 2024 and 2023.
General. For the six months ended June 30, 2024, the Company reported a net loss of $4.2 million, compared to net income of $68,000 for the six months ended June 30, 2023. Net interest income was up $728,000, or 19.1%, for the six months ended June 30, 2024, compared to the same period in 2023. The provision for credit losses totaled $194,000 for the six months ended June 30, 2024, compared to no provision for the same period in 2023. Non-interest income was down $5.4 million for the six months ended June 30, 2024, compared to the same period in 2023, primarily due to losses on the sales of investment securities. Non-interest expense for the six months ended June 30, 2024 was up $483,000, or 11.0%, compared to the same period in 2023, primarily due to expenses associated with the Company’s upgrade to a new core processing system.
Interest Income. Total interest income increased $2.1 million, or 45.6%, to $6.7 million for the six months ended June 30, 2024, compared to the same period in 2023. Interest income on loans and other interest-earning assets were up $1.3 million and $1.1 million, respectively. These increases were partially offset by a decrease in interest income on investment securities of $305,000.
The average loan yield was 6.27% for the six months ended June 30, 2024, up from 5.01% for the same period in 2023. Average loans were $147.3 million for the six months ended June 30, 2024, up $13.8 million, or 10.3%, compared to the same period in 2023.
The decrease in interest income on investment securities was primarily due to the decrease in the average balance of total investment securities due to the sales executed during the three months ended March 31, 2024. The average rate earned on our investment securities