Shareholders’ equity. Shareholders’ equity decreased $3.7 million, to $313.5 million at March 31, 2023 from $317.1 million at December 31, 2022. The decrease in shareholders’ equity primarily was due to the repurchase of $8.1 million of Company common stock and $1.3 million of accrued cash dividends payable for the quarter. In addition, shareholder’s equity was impacted by the adoption of CECL in the first quarter of 2023, which as of January 1, 2023, resulted in an after-tax decrease to opening retained earnings of $491,000. In addition, shareholder’s equity was adversely impacted by increased unrealized losses on available for sale securities reflecting the increase in market interest rates during the current quarter, resulting in a $1.3 million increase in accumulated other comprehensive loss, net of tax. During the three months ended March 31, 2023, the Company repurchased a total of 422,877 shares of its common stock at a total cost of $8.1 million, or $19.08 per share, leaving 58,915 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, 2023 and 2022
Earnings summary. Net income was $7.2 million for the three months ended March 31, 2023, compared to $5.2 million for the three months ended March 31, 2022, an increase of $1.9 million or 37.5%. The increase was the result of a $2.9 million increase in net interest income, a $1.8 million decrease in noninterest expense, partially offset by a $268,000 increase in provision for credit losses, a $1.0 million decrease in noninterest income and a $1.4 million increase in provision for income taxes. Diluted earnings per share were $0.57 for the three months ended March 31, 2023, compared to diluted earnings per share of $0.41 for the three months ended March 31, 2022.
Our efficiency ratio, which is calculated by dividing noninterest expense by the sum of net interest income before provision for credit losses and noninterest income, was 61.63% for the three months ended March 31, 2023, compared to 73.33% for the three months ended March 31, 2022. The improvement in the efficiency ratio during the three months ended March 31, 2023 compared to the same period in 2022 was due to lower noninterest expenses and higher revenues.
Interest income. Interest income for the three months ended March 31, 2023 was $30.1 million, compared to $24.8 million for the three months ended March 31, 2022, an increase of $5.3 million or 21.2%. The increase in interest income between periods reflects increases in interest income in all interest-earning asset categories, with the largest increases from loans, fed funds sold and interest bearing balances in banks and, to a lesser extent, investment securities available-for-sale. Increased yields earned on these portfolios, along with an increase in the average balance of loans, were the primary drivers for the increase in interest income. The increase in interest income was partially offset by lower recognition of deferred loan fee income on the repayment of PPP loans.
Interest income on loans, including fees, increased $3.3 million, or 14.5%, to $26.3 million for the three months ended March 31, 2023, compared to $22.9 million for the three months ended March 31, 2022, primarily due to a $132.8 million increase in the average loan balance and a 35 basis point increase in the average loan yield. 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, 2023 was 5.24%, compared to 4.89% for the same period in 2022. Interest income on loans for three months ended March 31, 2023 and 2022 included $97,000 and $1.3 million, 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 $371,000 and $603,000 at March 31, 2023 and March 31, 2022, respectively. Interest income on loans for three months ended March 31, 2023 and 2022 included $3,000 and $735,000, respectively, in fees earned related to PPP loans. As of March 31, 2023, there was a minimal amount of unrecognized deferred fees and costs. Interest income on loans for the three months ended March 31, 2023 and 2022, included $269,000 and $235,000, respectively, in fees related to prepayment penalties.
Interest income on investment securities increased $243,000, or 17.4%, to $1.6 million for the three months ended March 31, 2023, compared to $1.4 million for the three months ended March 31, 2022, due to a 37 basis point increase in the average yield earned on and a $9.1 million increase in the average balance of investment securities. The average yield on investment securities was 3.15% for the three months ended March 31, 2023 compared to 3.15% for the three months ended March 31, 2022.
Interest income on federal funds sold and interest-bearing balances in banks increased $1.6 million, or 766.7%, to $1.8 million for the three months ended March 31, 2023, compared to $211,000 for the three months ended March 31, 2022, due to a 434 basis point increase in the average yield earned on federal funds sold and interest-bearing balances in