Shareholders’ equity. Shareholders’ equity increased $62.5 million, to $324.7 million at March 31, 2022 from $262.6 million at December 31, 2021. The increase in shareholders’ equity was primarily due to issuance of stock related to our acquisition of PEB and net income, partially offset by the repurchase of $1.3 million of common stock and $685,000 of accrued cash dividends payable. In addition, shareholder’s equity was adversely impacted by a $5.7 million decrease in accumulated other comprehensive income resulting in a total comprehensive loss of $464,000 due to an increase in the unrealized loss on available for sale securities reflecting the increase in market interest rates during the current quarter. During the three months ended March 31, 2022, the Company repurchased a total of 57,177 shares of its common stock at a total cost of $1.3 million, or $22.18 per share, leaving 685,355 shares available for future purchases under the current stock repurchase plan. For additional information see Part II, Item 2, “Unregistered Sales of Equity Securities and Use of Proceeds”.
Comparison of Results of Operations for the Three Months Ended March 31, 2022 and 2021
Earnings summary. Net income was $5.2 million for the three months ended March 31, 2022, compared to $4.5 million for the three months ended March 31, 2021, an increase of $697,000 or 15.4%. The increase was the result of a $4.3 million increase in net interest income and a $394,000 increase in noninterest income, partially offset by a $4.2 million increase in noninterest expense. Diluted earnings per share were $0.41 for the three months ended March 31, 2022, an increase of $0.01 from diluted earnings per share of $0.40 for the three months ended March 31, 2021.
Our efficiency ratio, which is calculated by dividing noninterest expense by the sum of net interest income before provision for loan losses and noninterest income, was 73.33% and 69.31% for the three months ended March 31, 2022 and 2021, respectively. The higher efficiency ratio during the three months ended March 31, 2022 compared to the same period in 2021 was due to higher noninterest expenses.
Interest income. Interest income for the three months ended March 31, 2022 was $24.8 million, compared to $20.3 million for the three months ended March 31, 2021, an increase of $4.5 million or 22.4%. The increase in interest income between the periods reflects increases in interest income on loans and, to a lesser extent, investment securities due to increases in the average balances of these portfolios, partially offset by lower recognition of deferred loan fee income from SBA loan forgiveness related to PPP loans.
Interest income on loans, including fees, increased $3.7 million, or 19.5%, to $22.9 million during the three months ended March 31, 2022, compared to $19.2 million for the three months ended March 31, 2021 primarily due to $275.8 million increase in average loan balance, as well as the higher average yield earned on loans. The average yield on loans, including the accretion of the net discount and deferred PPP loan fees recognized for the three months ended March 31, 2022 was 4.89%, compared to 4.79% for the same period in 2021. Interest income on loans for the quarters ended March 31, 2022 and 2021 included $1.3 million and $675,000, respectively, in accretion of the net discount on acquired loans and revenue from purchase credit impaired loans in excess of discounts. The remaining net discount on these acquired loans was $603,000 and $2.7 million at March 31, 2022 and March 31, 2021, respectively. Interest income for the three months ended March 31, 2022 included $1.3 million in fees earned related to PPP loans compared to $1.2 million during the same period in 2021. As of March 31, 2022, total unrecognized fees on PPP loans were $735,000. Interest income on loans for the quarters ended March 31, 2022 and 2021, included $235,000 and $562,000, respectively, in fees related to prepayment penalties.
For the three months ended March 31, 2022, average PPP loans were $108.8 million and the average yield, including fees, was 5.89%. The impact of PPP loans on loan yields will change during any period based on the volume of prepayments or amounts forgiven by the SBA as certain criteria are met, but will cease completely after the maturity of the loans. Approximately two-thirds of the PPP loans are set to mature by the end of 2022, while the remaining loans have a five-year maturity date.
Interest income on investment securities and interest-bearing deposits in banks increased $740,000, or 85.3% to $1.6 million during the three months ended March 31, 2022, compared to $868,000 for the three months ended March 31, 2021, primarily due a $68.1 million increase in the average balance of investment securities, as well as a higher average yield earned on investment securities. The average yield on investment securities increased 43 basis point to 3.15% for the three months ended March 31, 2022 compared to 2.72% for the same period prior year.