rising interest rate environment. Interest income on interest-earning deposits, including certificates of deposit in other financial institutions and dividends on FHLB stock, increased $59,000, or 27.3%, for the year ended December 31, 2018, as a result of an increase in the average yield of 80 basis points, to 1.96%.
Interest Expense. Total interest expense increased $107,000, or 16.1%, to $770,000 for the year ended December 31, 2018 from $663,000 for the year ended December 31, 2017. Interest expense on deposit accounts increased $108,000, or 16.3%, to $770,000 for the year ended December 31, 2018 from $662,000 for the year ended December 31, 2017. The increase was due primarily to an increase in the average cost of total interest-bearing deposits of eleven basis points to 0.78% for the year ended December 31, 2018 from 0.68% for the year ended December 31, 2017.
Interest expense on FHLB advances decreased $1,000, or 100.0%, to $0 for the year ended December 31, 2018 from $1,000 for the year ended December 31, 2017. The average balance of advances decreased by $16,000 to $2,000 for the year ended December 31, 2018, compared to $18,000 for the year ended December 31, 2017, while the average cost of this advance stayed static at 3.33%. The decrease in the average balance of advances resulted from the Bank paying off a FHLB-Cincinnati advance during the year ended December 31, 2018.
Net Interest Income. Net interest income increased $683,000, or 19.0%, to $4.3 million for the year ended December 31, 2018, compared to $3.6 million for the year ended December 31, 2017. The increase reflected an increase in total interest and dividend income of $790,000. Our net interest margin increased to 3.56% for the year ended December 31, 2018 from 3.30% for the year ended December 31, 2017. The interest rate spread and net interest margin were impacted by the addition to portfolio of higher yielding loans, offset by the effect of rising interest rates on other interest bearing deposits for the year ended December 31, 2018, compared to the year ended December 31, 2017.
Provision for Loan Losses. Based on our analysis of the factors described in “Critical Accounting Policies — Allowance for Loan Losses,” we recorded a provision for loan losses of $99,000 for the year ended December 31, 2018 and $102,000 for the year ended December 31, 2017. The allowance for loan losses was $1.2 million, or 0.96% of total loans, at December 31, 2018, compared to $1.2 million, or 1.12% of total loans, at December 31, 2017. The provisions for loan losses in 2018 and 2017 were due primarily to increases in our total loan portfolio and changes in the composition of the portfolio. Total non-performing loans were $740,000 at December 31, 2018, compared to $1.4 million at December 31, 2017. Classified and special mention loans were $1.7 million at December 31, 2018, compared to $2.5 million at December 31, 2017. Total loans past due 30 days or more were $1.2 million and $1.0 million at December 31, 2018 and 2017, respectively. Net charge-offs totaled $93,000 for the year ended December 31, 2018, compared to $58,000 for the year ended December 31, 2017.
Non-Interest Income. Non-interest income decreased $440,000, or 20.3%, to $1.7 million for the year ended December 31, 2018 from $2.2 million for the year ended December 31, 2017. The decrease was primarily due to a decrease in the net gain on loan sales of $434,000 for the year ended December 31, 2018.
Non-Interest Expense. Non-interest expense increased $66,000, or 1.2%, to $5.5 million for the year ended December 31, 2018, compared to $5.4 million for the year ended December 31, 2017. The increase is reflective of increases in compensation and benefits and other expenses. Compensation and benefits increased by $138,000, or 4.2%, to $3.4 million for the year ended December 31, 2018 from $3.3 million for the year ended December 31, 2017. Legal and professional services increased $170,000, or 78.0%, to $388,000 for the year ended December 31, 2018 from $218,000 for the year ended December 31, 2017. Franchise and other taxes increased $111,000, or 102.8%, to $219,000 for the year ended December 31, 2018 from $108,000 for the year ended December 31, 2017. The increases in non-interest expense were offset by a decrease in charitable contribution expense in 2018, the result of a $500,000 charitable contribution made to the Eagle Savings Bank Charitable Foundation, a cost related to our conversion to a stock company that was recognized in the third quarter of 2017.
Increases in legal and professional services resulted from costs associated with operating as a public company and increased compensation costs related to implementation of our stock based benefit plans.
Federal Income Taxes. Federal income taxes increased by $176,000 to a tax expense of $94,000 for the year ended December 31, 2018, compared to tax benefit of $82,000 for the year ended December 31, 2017. The reason for the small increase in tax expense despite the increase of income before income taxes of $180,000 was the result of the tax reform legislation at the end of 2017.