Research and development. R&D expense decreased $224,010, or 25.7%, to $646,795, or 10.5% of net sales, in the three months ended June 30, 2021 from $870,805, or 14.6% of net sales, in the three months ended June 30, 2020. The decrease in R&D expense in the quarter was primarily the result of a decrease in third party costs related to STC certifications as compared to the year ago quarter.
Selling, general and administrative. Selling, general and administrative expense increased by $232,716 to $1,512,138 in the three months ended June 30, 2021 from $1,279,422 in the three months ended June 30, 2020. As a percentage of net sales, selling, general and administrative expenses increased to 24.5% of net sales in the three months ended June 30, 2021 from 21.5% of net sales in the three months ended June 30, 2020. The increase in selling, general and administrative expense in the quarter was primarily the result of an increase in professional fees, employee stock compensation, payroll and payroll related benefits.
Interest income. Interest income decreased by $7,660 to $107 in the three months ended June 30, 2021 from $7,767 in the three months ended June 30, 2020, mainly a result of decreased cash balance and lower interest rates in the current year period compared to the same period in the prior year.
Other income. Other income is mainly composed of royalties earned and increased by $970 to $17,231 in the three months ended June 30, 2021 compared to the same period in the prior year.
Income tax expense. The income tax benefit for the three months ended June 30, 2021 was $1,473,014 as compared to an income tax expense of $8,616 for the three months ended June 30, 2020.
The effective tax benefit rate for the three-month period ended June 30, 2021 was 121.4% and differs from the statutory tax rate primarily due to the release of the valuation allowance for all federal and some state deferred tax assets. This release both increased the deferred tax asset and removed the valuation allowance.
The effective tax rate for the three months ended June 30, 2020 was 0.7% and differs from the statutory tax rate primarily due to an increase in the NOL usage due to an increase in pretax book income and the release of the valuation allowance. This loss utilization both decreased the deferred tax asset and the valuation allowance. For the three months ended June 30, 2020, the valuation allowance decreased by approximately $243,300 to $3,485,000 and is recorded against all its federal and state deferred tax assets.
Net income. The Company reported net income for the three months ended June 30, 2021 of $2,685,921 compared to net income of $1,259,858 for the three months ended June 30, 2020. On a diluted basis, the net income per share was $0.16 for the three months ended June 30, 2021 compared to net income per share of $0.07 for the three months ended June 30, 2020.
Nine Months Ended June 30, 2021 Compared to the Nine Months Ended June 30, 2020
Net sales. Net sales were $16,171,680 for the nine months ended June 30, 2021 compared to $15,300,182 for the nine months ended June 30, 2020, an increase of 5.7%. Product sales increased $1,336,843 in the nine months ended June 30, 2021 compared to the nine months ended June 30, 2020, and EDC sales decreased $456,345 from the same period in the prior year. Product sales for the nine months ended June 30, 2021 increased from the same period in the prior year primarily because of increased shipments of King Air autothrottle systems to our OEM customer. The decrease in EDC sales in the current year period was primarily the result of the completion in prior fiscal year of a modification contract with the U.S. Navy.
Cost of sales. Cost of sales increased $339,673, or 4.8%, to $7,348,364, or 45.4% of net sales, in the nine months ended June 30, 2021, compared to $7,008,691 or 45.8% of net sales, in the nine months ended June 30, 2020. The increase in cost of sales was primarily the result of an increase in labor and related benefit costs attributable to an increase in headcount to meet customer backlog requirements offset by lower material costs reflecting product mix for the nine months ended June 30, 2021 compared to the nine months ended June 30, 2020. The Company’s overall gross margin was 54.6% and 54.2% for the nine months ended June 30, 2021 and 2020, respectively.
Research and development. R&D expense decreased $312,692, or 13.9%, to $1,936,747, or 12.0% of net sales, in the nine months ended June 30, 2021 from $2,249,439, or 14.7% of net sales, in the nine months ended June 30, 2020. The decrease in R&D expense