interest income between periods reflects increases in interest income in all interest-earning asset categories, with the largest increases from loans, and fed funds sold and interest bearing balances in banks. Increased yields earned on interest-earning assets, along with an increase in the average balance of fed funds sold and interest bearing balances in banks, were the primary drivers for the increase in interest income.
Interest income on loans, including fees, increased $3.2 million, or 13.4%, to $27.2 million for the three months ended September 30, 2023, compared to $24.0 million for the three months ended September 30, 2022, due to a 69 basis point increase in the average loan yield, partially offset by a $24.2 million decrease in the average balance of loans. The average yield on loans, including the accretion of the net discount and deferred PPP loan fees recognized for the three months ended September 30, 2023, was 5.42%, compared to 4.73% for the three months ended September 30, 2022. Interest income on loans for three months ended September 30, 2023 and 2022 included $372,000 and $63,000, respectively, in accretion of the net discount on acquired loans and revenue from PCD loans in excess of discounts. The remaining net discount on acquired loans was $419,000 and $480,000 at September 30, 2023 and September 30, 2022, respectively. Interest income on loans for three months ended September 30, 2023, included minimal fees earned related to PPP loans, compared to $161,000 in fees earned related to PPP loans during the three months ended September 30, 2022. As of September 30, 2023, there was a minimal amount of unrecognized PPP deferred fees and costs. Interest income on loans for the three months ended September 30, 2023 and 2022, included $142,000 and $195,000, respectively, in fees related to prepayment penalties.
Interest income on investment securities increased $149,000, or 9.6%, to $1.7 million for the three months ended September 30, 2023, compared to $1.6 million for the three months ended September 30, 2022, due to a 74 basis point increase in the average yield earned on investment securities, partially offset by a $20.1 million decrease in the average balance of investment securities. The average yield on investment securities was 4.01% for the three months ended September 30, 2023 compared to 3.27% for the three months ended September 30, 2022.
Interest income on federal funds sold and interest-bearing balances in banks increased $2.2 million, or 173.8%, to $3.5 million for the three months ended September 30, 2023, compared to $1.3 million for the three months ended September 30, 2022. The increase was due to a 320 basis point increase in the average yield earned on federal funds sold and, to a lesser extent, a $25.0 million increase in the average balance of federal funds sold and interest-bearing balances in banks. The average yield on federal funds sold and interest-bearing balances in banks was 5.38% for the three months ended September 30, 2023 compared to 2.18% for the three months ended September 30, 2022. In addition, during the third quarter of 2023, we received $376,000 in cash dividends on our FRB and FHLB stock, up 31.9% from $285,000 in the third quarter of 2022.
Interest income for the nine months ended September 30, 2023 was $94.1 million, compared to $77.6 million for the nine months ended September 30, 2022, an increase of $10.2 million or 14.6%. The increase in interest income between periods reflects increases in interest income in all interest-earning asset categories, with the largest increases from loans, and federal funds sold and interest bearing balances in banks. Increased yields earned on interest-earning assets, along with an increase in the average balance of loans, were the primary drivers for the increase in interest income.
Interest income on loans, including fees, increased $10.2 million, or 14.6%, to $80.2 million for the nine months ended September 30, 2023, compared to $69.9 million for the nine months ended September 30, 2022. The increase was primarily due to a 57 basis point increase in the average loan yield and, to a lesser extent, a $46.2 million increase in the average balance of loans. The average yield on loans, including the accretion of the net discount and deferred PPP loan fees recognized for the nine months ended September 30, 2023, was 5.31%, compared to 4.74% for the same period in 2022. Interest income on loans for nine months ended September 30, 2023 and 2022 included $474,000 and $1.5 million, respectively, in accretion of the net discount on acquired loans and revenue from PCD loans in excess of discounts. Interest income on loans for nine months ended September 30, 2023 and 2022 included $92,000 and $1.7 million in fees earned related to PPP loans, respectively. Interest income on loans for the nine months ended September 30, 2023 and 2022, included $458,000 and $916,000, respectively, in fees related to prepayment penalties.
Interest income on investment securities increased $554,000, or 12.4%, to $5.0 million for the nine months ended September 30, 2023, compared to $4.5 million for the nine months ended September 30, 2022, due to a 76 basis point increase in the average yield earned on investment securities, partially offset by a $17.0 million decrease in the average