for the three months ended June 30, 2020. The overall average cost of deposits for the three months ended June 30, 2021 declined to 0.25%, compared to 0.53% for the three months ended June 30, 2020 due to an increase in noninterest bearing deposits and a reduction in market interest rates over the last year. The average balance of noninterest bearing deposits increased $49.5 million, or 7.10%, to $746.3 million for the three months ended June 30, 2021 compared to $696.8 million for the same period in 2020. The market’s response to lowering deposit pricing to reflect the targeted federal funds rate decreases over the past year typically lags declines in the yield on interest earning assets.
Interest expense on borrowings increased $796,000 or 425.6%, to $983,000 for the three months ended June 30, 2021, from $187,000 for the three months ended June 30, 2020, as a result of the issuance of subordinated debt in August 2020, which currently has a 5.25% interest rate. The average balance of borrowings outstanding increased $14.2 million to $73.8 million during the three months ended June 30, 2021, compared to $59.6 million during the three months ended June 30, 2020. The average cost of borrowing increased to 5.34% for the three months ended June 30, 2021, compared to 1.26% for the three months ended June 30, 2020.
Interest expense increased by $84,000, or 1.9%, to $4.4 million for the six months ended June 30, 2021 compared to $4.3 million for the six months ended June 30, 2020. The average cost of interest bearing liabilities decreased 6 basis points to 0.66% for the six months ended June 30, 2021 compared to 0.72% for the six months ended June 30, 2020. Total average interest bearing liabilities increased $132.7 million, or 10.99%, to $1.3 million for the six months ended June 30, 2021 from $1.2 million for the six months ended June 30, 2020.
Interest expense on deposits decreased $1.6 million, or 39.2%, to $2.4 million during the six months ended June 30, 2021 from $4.0 million the same period in 2020 primarily due to a decrease in the average rate paid on interest bearing deposits. The average rate paid on interest bearing deposits decreased by 30 basis points to 0.39% for the six months ended June 30, 2021 compared to 0.69% for the six months ended June 30, 2020.
The overall average cost of deposits for the six months ended June 30, 2021 declined to 0.25%, compared to 0.45% for the six months ended June 30, 2020 due to an increase in noninterest bearing deposits and a reduction in market interest rates over the last year. The average balance of noninterest bearing deposits increased $17.4 million, or 2.64%, to $679.5 million for the six months ended June 30, 2021 compared to $662.1 million for the six months ended June 30, 2020.
Interest expense on borrowings increased to $2.0 million for the six months ended June 30, 2021, from $313,000 for the six months ended June 30, 2020, as a result of a higher average balance of borrowings outstanding due to the issuance of the subordinated debt in August 2020. The average balance of borrowing outstanding increased $30.4 million to $75.2 million during the six months ended June 30, 2021, compared to $38.6 million during the six months ended June 30, 2020. The average cost of borrowing increased to 5.27% for the six months ended June 30, 2021, compared to 1.36% for the six months ended June 30, 2020.
Net interest income. Net interest income decreased $3.2 million, or 15.1%, to $17.8 million for the three months ended June 30, 2021, compared to $21.0 million for the three months ended June 30, 2020, and decreased $5.1 million, or 12.5%, to $35.9 million for the six months ended June 30, 2021, compared to $41.0 million for the six months ended June 30, 2020. During the three and six months ended June 30, 2021, the interest margin was impacted by lower yielding loans, including PPP loans and resetting adjustable rate instruments as well as reduced interest rates on new fixed-rate real estate loan and adjustable-rate commercial loan originations. PPP loans are originated at an interest rate of 1%, although the effective yield is higher as a result of the origination fees paid to us by the SBA. The average yield on PPP loans was 4.74% and 4.59%, including the recognition of deferred fees, resulting in a positive impact to the net interest margin of eight basis points and six basis points during the three and six months ended June 30, 2021, compared to a negative impact of six basis points and three basis points during the comparable periods in 2020, respectively. Accretion of acquisition accounting discounts on loans and the recognition of revenue from acquired loans in excess of discounts increased our net interest margin by ten and 17 basis points during the three and six months ended June 30, 2021 and 47 and 44 basis points during the three and six months ended June 30 2020, respectively.
The average yield on interest earning assets for the three months ended June 30, 2021 was 3.69%, a 83 basis point decrease from 4.52% for the three months ended June 30, 2020, due primarily to lower market interest rates, while the average cost of interest bearing liabilities for the three months ended June 30, 2021 increased to 0.68%, or eight basis