Interest and Dividend Income. Interest and dividend income on a tax equivalent basis decreased $1.2 million, or 3.3%, to $35.8 million for the three months ended September 30, 2021, compared to $37.1 million for the three months ended September 30, 2020. All adjustable rate products were negatively impacted by the Federal Reserve cuts to the federal funds rate, and although loan origination volume remains strong, lower rates on loan originations negatively impacted interest and dividend income. For the three months ended September 30, 2021, the components of the decrease were an $816,000 decrease in interest on loans, a $395,000 decrease in interest on loans held for sale, a $26,000 decrease investment income, and a $5,000 decrease in interest on other interest earning assets. The decrease in interest on loans reflects a $73.4 million decrease in average balances and a 3 basis point decrease in the yield. Loan interest income for the three months ended September 30, 2021 included $675,000 in accretion income from the fair value discount on loans acquired from Coastway Bancorp, Inc.(“Coastway”), as compared to $1.6 million for the three months ended September 30, 2020. Loan interest income for the three months ended September 30, 2021 also includes $1.9 million in recognition of origination fees on the PPP loans, as compared to $653,000 for the three months ended September 30, 2020. The decrease in interest on loans held for sale reflected a lower average balance due to a decrease in residential real estate mortgage loan demand.
Compared to the first nine months of 2020, interest and dividend income decreased $3.3 million, or 3.0%, reflecting a $1.9 million decrease in investment income, a $845,000 decrease in total loan income, and a $789,000 decrease in other interest-earning assets income, partially offset by a $216,000 increase in income from loans held for sale. Average investments increased $57.1 million; however, the yield decreased 121 basis points, primarily as a result of accelerated amortization of premiums on mortgage-backed securities. The average of total loans increased $104.2 million, offset by a 15 basis points decrease in the yield. The average of other interest-bearing assets increased $141.1 million, offset by a 73 basis point decrease in yield.
Interest Expense. Interest expense decreased $2.9 million, or 48.9%, to $3.0 million for the three months ended September 30, 2021 from $5.9 million for the three months ended September 30, 2020. The decrease resulted from a $2.5 million decrease in interest expense on deposits and a $404,000 decrease in interest expense on FHLB borrowings. The decrease in interest expense on deposits reflected a 37-basis point decrease in the cost of interest-bearing deposits, partially offset by $175.4 million, or 6.4%, increase in the average balance of interest-bearing deposits. The cost of deposit funds was significantly impacted by falling rates and the deposit mix, as customers moved to more liquid options. The average balance of savings accounts increased $238.4 million, or 26.6%, and the average cost of savings accounts decreased 13 basis points. The cost of money market deposits decreased 17 basis points to 0.19% for the three months ended September 30, 2021 compared to the three months ended September 30, 2020, and the average balance increased 0.8%. Average certificates of deposit decreased by $113.4 million, or 16.6%, and the cost of certificates of deposits was 0.76% for the second quarter of 2021 compared to 1.68% for the second quarter of 2020. The decrease in interest expense on FHLB advances resulted from a $65.3 million, or 43.6% decrease in average balances and a 19-basis point decrease in the cost of FHLB advances.
Compared to the first nine months of 2020, interest expense decreased $13.4 million, or 56.8%, to $10.2 million from $23.5 million reflecting similar trends discussed in the quarter over quarter results. Average interest bearing deposits increased $229.2 million, or 8.6%, and the cost of interest-bearing deposits decreased 63 basis points year over year. The decrease in interest expense on FHLB borrowings is due to the average balance decrease of $121.9 million, or 56.3%, partially offset by a 33 basis point increase in the cost of borrowed funds.
Net Interest and Dividend Income. Net interest and dividend income on a tax equivalent basis increased $1.6 million, or 5.2%, to $34.4 million for the three months ended September 30, 2021 from $31.2 million for the three months ended September 30, 2020, primarily as a result of deposit account repricing and commercial loan growth. The tax equivalent net interest spread increased 10 basis points to 2.97% for the three months ended September 30, 2021 from 2.87% for the three months ended September 30, 2020, and net interest margin on a tax equivalent basis decreased 1 basis point to 3.08% for the three months ended September 30, 2021 from 3.09% for three months ended September 30, 2020.
Compared to the first nine months of 2020, net interest and dividend income increased $10.1 million, or 11.5%, to $97.4 million from $87.3 million. The tax equivalent net interest spread increased 23 basis points to 2.96% for the nine months ended September 30, 2021 from 2.73% for the nine months ended September 30, 2020, and net interest margin on a tax equivalent basis also increased by 9 basis points to 3.09% for the nine months ended September 30, 2021 from 3.00% for the nine months ended September 30, 2020.