Research and Development. Research and development expense is primarily comprised of compensation expense. Research and development expense increased by $18.2 million, or 12.1%, to $169.0 million in the six months ended March 31, 2022, from $150.8 million in the six months ended March 31, 2021. Research and development expense increased as a percentage of revenue from 7.1% in the six months ended March 31, 2021, to 7.5% in the six months ended March 31, 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 $24.2 million, or 10.1%, to $263.1 million in the six months ended March 31, 2022, from $238.8 million in the six months ended March 31, 2021. Selling, general and administrative expense increased as a percentage of revenue from 11.2% in the six months ended March 31, 2021, to 11.7% in the six months ended March 31, 2022. The increase 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 six months ended March 31, 2022, decreased by $5.7 million, or 13.6% to $36.1 million from $41.7 million in the six months ended March 31, 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 $34.4 million, or 11.9%, in the six months ended March 31, 2022, to $323.8 million, or 14.4% of revenue, from $289.4 million, or 13.6% of revenue, in the six months ended March 31, 2021. Our revenue in the six months ended March 31, 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 selling, general and administrative expense and research and development expense. Our operating income was negatively affected by foreign exchange impacts.
Interest and Other Expense, Net. Interest and other expense, net, changed from a net expense of $10.0 million in the six months ended March 31, 2021 to a net expense of $11.2 million in the six months ended March 31, 2022. The increase in interest and other expense, net, was primarily attributable to an increase in foreign exchange fluctuation impacts, partially offset by changes of minority equity investments measured at fair value and decrease in interest expenses related to financing activities recorded in the six months ended March 31, 2022 compared to the six months ended March 31,2021.
Gain from sale of a business. Gain from sale of a business, in the six months ended March 31, 2022, decreased by $216.4 million, or 95.6% to $10.0 million from $226.4 million in the six months ended March 31, 2022. Please see Note 3 to our consolidated financial statements.
Income Tax (benefit) expense. Income tax (benefit) expense for the six months ended March 31, 2022 were $30.5 million on pre-tax income of $322.6 million, resulting in an effective tax rate of 9.5%, compared to 17.2% in the six months ended March 31, 2021. The decrease in the effective tax rate is primarily attributable to a tax benefit recorded during the six months ended March 31, 2022, see also note 9 to our consolidated financial statements. Our effective tax rate may fluctuate between periods as a result of discrete items that may affect a particular period. Please.
Net Income. Net income decreased by $126.6 million, or 30.2%, to $292.1 million in the six months ended March 31, 2022, from $418.7 million in the six months ended March 31, 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 six months ended March 31, 2021, partially offset by decrease in income tax (benefit) expense and by an increase in operating income.
Diluted Earnings Per Share. Diluted earnings per share decreased by $0.85, or 26.6%, to $2.34 in the six months ended March 31, 2022, from $3.19 in the six months ended March 31, 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.05 and $1.42 for the six months ended March 31, 2022 and 2021, respectively. The decrease was partially offset by tax benefit as described in note 9 to our consolidated financial statements, recorded in the six months ended March 31, 2022, by an increase in operating income 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