Research and Development. Research and development expense is primarily comprised of compensation expense. Research and development expense increased by $26.9 million, or 11.6%, to $258.5 million in the nine months ended June 30, 2022, from $231.6 million in the nine months ended June 30, 2021. Research and development expense increased as a percentage of revenue from 7.2% in the nine months ended June 30, 2021, to 7.6% in the nine months ended June 30, 2022, as we have been accelerating our investment in our cloud offerings, 5G and network related innovation and further developing our digital offerings. Our research and development efforts are a key element of our strategy and are essential to our success, and we intend to maintain our commitment to research and development. However, increase or decrease in our revenue would not necessarily result in a proportional increase or decrease in the levels of our research and development expenditures, which could affect our operating margin.
Selling, General and Administrative. Selling, general and administrative expense, which is primarily comprised of compensation expense, increased by $37.9 million, or 10.5%, to $399.2 million in the nine months ended June 30, 2022, from $361.2 million in the nine months ended June 30, 2021. Selling, general and administrative expense increased as a percentage of revenue from 11.3% in the nine months ended June 30, 2021, to 11.7% in the nine months ended June 30, 2022. The increase as a percentage of revenue was primarily attributable to sales and marketing efforts, and to selling, general and administrative expense attributable to recent completed acquisitions, which were partially offset by decrease in the account receivable allowances. Selling, general and administrative expense may fluctuate from time to time, depending upon such factors as changes in our workforce and sales efforts and the results of any operational efficiency programs that we may undertake.
Amortization of Purchased Intangible Assets and Other. Amortization of purchased intangible assets and other in the nine months ended June 30, 2022, decreased by $7.3 million, or 12.0% to $53.2 million from $60.5 million in the nine months ended June 30, 2021. The decrease in amortization of purchased intangible assets and other was primarily attributable to a completion of amortization of previously purchased intangible assets, and to a lesser extent, a decrease in acquisition-related costs, partially offset by an increase in amortization of intangible assets due to recently completed acquisitions.
Operating Income. Operating income increased by $48.7 million, or 11.0%, in the nine months ended June 30, 2022, to $493.1 million, or 14.5% of revenue, from $444.4 million, or 13.9% of revenue, in the nine months ended June 30, 2021. Our revenue in the nine months ended June 30, 2022 increased in a higher rate than the increase in cost of revenue, which resulted in an increase in our operating income. The increase in operating income was partially offset by increase in research and development expense and selling, general and administrative expense. Our operating income was negatively affected by foreign exchange impacts.
Interest and Other (Expense) Income, Net. Interest and other (expense) income, net, changed from a net expense of $9.7 million in the nine months ended June 30, 2021 to a net expense of $19.0 million in the nine months ended June 30, 2022. The increase in interest and other (expense) income, net, was primarily attributable to an increase in foreign exchange fluctuation impacts and changes of minority equity investments measured at fair value, partially offset by decrease in interest expenses related to financing activities recorded in the nine months ended June 30, 2022 compared to the nine months ended June 30, 2021.
Gain from sale of a business. Gain from sale of a business, in the nine months ended June 30, 2022, decreased by $216.4 million, or 95.6% to $10.0 million from $226.4 million in the nine months ended June 30, 2022. Please see Note 3 to our consolidated financial statements.
Income Taxes. Income taxes for the nine months ended June 30, 2022 were $63.6 million on pre-tax income of $484.1 million, resulting in an effective tax rate of 13.1%, compared to 14.6% in the nine months ended June 30, 2021. The decrease in the effective tax rate is primarily attributable to income taxes for the nine months ended June 30, 2022, included a tax benefit recorded that period, see also note 9 to our consolidated financial statement. Our effective tax rate may fluctuate between periods as a result of discrete items that may affect a particular period.
Net Income. Net income decreased by $144.3 million, or 25.5%, to $420.6 million in the nine months ended June 30, 2022, from $564.8 million in the nine months ended June 30, 2021. The decrease in net income was primarily attributable to the gain from sale of a business, net of tax, which was recorded in the nine months ended June 30, 2021, partially offset by an increase in operating income and a decrease in income taxes in the nine months ended June 30, 2022.
Diluted Earnings Per Share. Diluted earnings per share decreased by $0.95, or 21.9%, to $3.39 in the nine months ended June 30, 2022, from $4.34 in the nine months ended June 30, 2021. The decrease in diluted earnings per share was primarily attributable to the gain from sale of a business, net of tax, which increased the diluted earnings per share by $0.06 and $1.43 for the nine months ended June 30, 2022 and 2021, respectively. The decrease was partially offset by an increase in operating income, decrease in income taxes and by the decrease in the diluted weighted average number of shares outstanding, which resulted from share repurchases. Please see also Note 10 to our consolidated financial statements.
27