For the six months ended June 30, 2024, the average balance of interest-earning assets decreased by $42.2 million, or 3.4%, to $1.21 billion while the average yield improved by 46 basis points to 5.22%, when compared to the six months ended June 30, 2023. The average balance of interest-bearing liabilities decreased by $12.7 million, or 1.4%, primarily due to a decrease in deposits, partially offset by the increase in the average balance of FHLB advances, while the cost of interest-bearing liabilities increased by 68 basis points to 2.93%. The net interest margin decreased by 9 basis points to 3.00% and the interest rate spread decreased by 22 basis points to 2.29% for the six months ended June 30, 2024.
The provision for credit losses on loans increased by $899,000, or 198.9%, from a credit of $452,000 for the quarter ended June 30, 2023 to an expense of $447,000 for the quarter ended June 30, 2024. The credit to the provision for the three months ended June 30, 2023 was primarily attributable to a decrease in loan balances, primarily indirect automobile loans, and a $710,000 charge-off on a leveraged loan, which reduced the credit that would have been taken.
Net charge-offs increased $211,000 from $622,000 for the second quarter of 2023 to $833,000 for the second quarter of 2024. The increase was primarily due to increased net charge-offs in indirect automobile loans of $465,000 and a $275,000 charge-off on a commercial real estate property. Net charge-offs increased $48,000, or 4.6% to $1.1 million for the first six months of 2024. The percentage of overdue account balances to total loans decreased to 1.58% as of June 30, 2024, from 1.90% as of December 31, 2023, while non-performing assets decreased $29,000, or 0.7%, to $4.2 million at June 30, 2024.
Non-interest income totaled $1.5 million for the three months ended June 30, 2024, an increase of $156,000, or 11.5%, from the comparable period in 2023, due primarily to an increase of $144,000, or 61.5%, in investment advisory income resulting from the improved market and economic conditions, an increase of $24,000 in the cash surrender value of life insurance and an increase of $18,000 in service charges on deposit accounts, partially offset by decreases in the gain on sales of loans of $17,000 and a $19,000 gain on disposal of premises and equipment in 2023.
Non-interest income totaled $3.0 million for the six months ended June 30, 2024, an increase of $286,000, or 10.5%, from the comparable period in 2023, due primarily to an increase of $216,000, or 39.8%, in investment advisory income resulting from the improved market and economic conditions, an increase of $48,000 in the cash surrender value of life insurance, an increase of $53,000 in service charges on deposit accounts, and an increase in the gain on sales of loans of $19,000, partially offset by a decrease of $54,000 on the disposal of premises and equipment.
Non-interest expense totaled $8.9 million for the second quarter of 2024, a decrease of $342,000, or 3.7%, over the comparable period in 2023. The decrease was primarily due to a $158,000, or 25.6%, decrease in professional fees as consulting fees on our indirect business were higher in 2023. FDIC deposit insurance and other insurance decreased $93,000, or 26.3%, primarily due a decreased assessment rate while salaries and occupancy expenses decreased $40,000 and $25,000, respectively, due to a reduction in force in our indirect lending business and a branch closure in the first quarter of 2024. Marketing expense and other non-interest expense decreased $28,000 and $12,000, respectively, while data processing fees increased $15,000 during the second quarter of 2024 as compared to 2023.
Non-interest expense totaled $17.8 million for the first six months of 2024, a decrease of $668,000, or 3.6%, over the comparable period in 2023. The decrease was primarily due to a $288,000, or 2.8%, decrease in salaries and benefits due to a Company-wide reduction in force of approximately 5% in the first quarter of 2023 and a further reduction in force in the first quarter of 2024 with the Company’s strategic decision to reduce its indirect automobile business. FDIC deposit insurance and other insurance decreased $122,000, or 19.2%, primarily due a decreased assessment rate while professional fees decreased $110,000, or 11.2%. Occupancy expense decreased $51,000, or 2.4%, due to a branch closure in the first quarter of 2024 and other non-interest expense decreased $120,000, or 3.7%, primarily due to decreased retail banking expenses.