Net interest income was $62.7 million for the six months ended June 30, 2022, an increase of $11.0 million, or 21.3%, compared to $51.7 million for the six months ended June 30, 2021. The increase in net interest income was primarily due to growth in average interest earning assets and lower rates paid on deposits, offset partially by declining yields on loans and lower PPP fee recognition.
Net interest margin (on a fully tax-equivalent basis) for the six months ended June 30, 2022 was 3.59%, compared to 3.56% for the six months ended June 30, 2021, an increase of three basis points. Core net interest margin (on a fully tax-equivalent basis), a non-GAAP financial measure which excludes the impact of loan fees and PPP balances, interest, and fees, for the six months ended June 30, 2022 was 3.34%, a one basis point increase from 3.33% for the six months ended June 30, 2021.
Average interest earning assets for the six months ended June 30, 2022 increased $600.3 million, or 20.3%, to $3.55 billion from $2.95 billion for the six months ended June 30, 2021. This increase in average interest earning assets was primarily due to strong organic growth in the loan portfolio and continued purchases of investment securities, offset partially by the forgiveness of PPP loans and the reduction of cash balances. Average interest bearing liabilities increased $355.7 million, or 17.7%, to $2.36 billion for the six months ended June 30, 2022, from $2.01 billion for the six months ended June 30, 2021. The increase in average interest bearing liabilities was primarily due to an increase in interest bearing deposits and federal funds purchased, as well as the issuance of additional subordinated debentures in July 2021, offset partially by a decrease in FHLB advances.
Average interest earning assets produced a tax-equivalent yield of 4.15% for the six months ended June 30, 2022, compared to 4.24% for the six months ended June 30, 2021. The average rate paid on interest bearing liabilities was 0.83% for the six months ended June 30, 2022, compared to 1.00% for the six months ended June 30, 2021.
Interest Income. Total interest income on a tax-equivalent basis was $73.0 million for the six months ended June 30, 2022, compared to $62.0 million for the six months ended June 30, 2021. The $11.0 million, or 17.7%, increase in total interest income on a tax-equivalent basis was primarily due to strong organic growth in the loan portfolio and continued purchases of investment securities, offset partially by a reduction in the recognition of PPP origination fees as the PPP loan portfolio continues to be forgiven.
Interest income on the investment securities portfolio, on a fully-tax equivalent basis, increased $1.4 million, or 28.1%, during the six months ended June 30, 2022, compared to the six months ended June 30, 2021, primarily due to an $81.3 million, or 21.0%, increase in average balances between the periods.
Interest income on loans, on a fully-tax equivalent basis, for the six months ended June 30, 2022 was $66.3 million, compared to $56.7 million for the six months ended June 30, 2021. The $9.6 million, or 16.9%, increase was primarily due to a 22.0% increase in the average balance of loans outstanding, which was offset partially by a 19 basis point decline in the average yield on loans.
Interest Expense. Interest expense on interest bearing liabilities decreased $137,000, or 1.4%, to $9.8 million for the six months ended June 30, 2022, compared to $9.9 million for the six months ended June 30, 2021, primarily due to lower rates paid on deposits, offset partially by the growth of interest bearing deposits, an increase of federal funds purchased and the issuance of additional subordinated debentures.
Interest expense on deposits decreased to $6.6 million for the six months ended June 30, 2022, compared to $7.2 million for the six months ended June 30, 2021. The $570,000, or 7.9%, decrease in interest expense on deposits was primarily due to a 16 basis point decrease in the average rate paid, even as the average balance of interest bearing deposits increased 15.2%. The decrease in the average rate paid was primarily due to the downward repricing of time and brokered deposits over the course of the year. The increase in the average balance of interest bearing deposits resulted primarily from increases in interest bearing transaction deposits, savings and money market deposits, and brokered deposits, offset partially by a decline in time deposits.