Net Revenues. Net revenues increased by 1.3% from $8.8 million in the three months ended June 30, 2021 to $8.9 million in the three months ended June 30, 2022. Net revenues in both periods were impacted by the COVID-19 global pandemic. Although net revenues for the three months ended June 30, 2022 increased when compared to the three months ended June 30, 2021, supply chain constraints have had an impact on our ability to fulfill all of our orders. While there has been some improvement in the supply chain, the situation remains fluid, and we do not expect significant relief from these constraints before the end of calendar year 2022. Our net revenues continue to demonstrate the challenges that we are facing during the COVID-19 global pandemic, which has restricted the activities of our sales force and distributors, reduced customer demand and caused the postponement of investment in certain customer sectors. These challenges continue to impact us as we enter new markets and engage with target customers. Industry conferences and on-site training workshops, which are typically used for building a sales pipeline, have been limited due to COVID-19 related restrictions. We have adapted our sales strategies for the COVID-19 environment as there are limitations with both in-person and virtual meetings, particularly, government and defense customers with regards to secure teleconferencing. However, we are still not operating at an optimal level.
The overall average selling price of all units shipped in the quarter ended June 30, 2022 decreased by 6.1% compared to the quarter ended June 30, 2021 and the number of units shipped increased 7.2% in the quarter ended June 30, 2022 compared to the quarter ended June 30, 2021. The change in the average selling price was due to changes in product mix, as we sold more higher density, higher average selling price products in the fiscal 2022 period compared to the current fiscal year period. Direct and indirect sales to Nokia, currently our largest customer, decreased from $3.8 million in the three months ended June 30, 2021 to $1.3 million in the three months ended June 30, 2022. Shipments to Nokia in the quarter ended June 30, 2021 included approximately $1.0 million of buffer stock in anticipation of perceived market tightness. Shipments of our SigmaQuad product line accounted for 63.6% of total shipments in the three months ended June 30, 2021 compared to 44.8% of total shipments in the three months ended June 30, 2022. The level of our SigmaQuad shipments was impacted by the decrease in shipments to Nokia in the quarter ended June 30, 2022 compared to the quarter ended June 30, 2021.
Cost of Revenues. Cost of revenues decreased by 11.6% from $4.0 million in the three months ended June 30, 3021 to $3.5 million in the three months ended June 30, 2022. Cost of revenues included a provision for excess and obsolete inventories of $160,000 in the three months ended June 30, 2021 compared to $43,000 in the three months ended June 30, 2022. Cost of revenues included stock-based compensation expense of $70,000 and $60,000 for the three months ended June 30, 2021 and 2022, respectively.
Gross Profit. Gross profit increased by 12.2% from $4.8 million in the three months ended June 30, 2021 to $5.4 million in the three months ended June 30, 2022. Gross margin increased from 54.4% in the three months ended June 30, 2021 to 60.2% in the three months ended June 30, 2022. The changes in gross profit are primarily related to the change in net revenues discussed above. The changes in gross margin are primarily related to changes in the mix of products and customers.
Research and Development Expenses. Research and development expenses increased by 8.5% from $6.1 million in the three months ended June 30, 2021 to $6.6 million in the three months ended June 30, 2022. The increase in research and development spending was primarily related to increases of $517,000 in outside consulting expenses and $156,000 in software maintenance expense which was partially offset by a decrease in stock-based compensation expense. Research and development expenses included stock-based compensation expense of $470,000 and $351,000 for the three months ended June 30, 2021 and 2022, respectively.
Selling, General and Administrative Expenses. Selling, general and administrative expenses decreased by 11.6% from $3.0 million in the three months ended June 30, 2021 to $2.7 million in the three months ended June 30, 2022. This included a decrease of $417,000 in the value of contingent consideration in the three months ended June 30, 2022 compared to an increase of $22,000 in the quarter ended June 30, 2021. The change in contingent consideration was partially offset by an increase of $149,000 in professional fees and outside consulting expenses. Selling, general and administrative expenses included stock-based compensation expense of $283,000 and $227,000 for the three months ended June 30, 2021 and 2022, respectively.
Interest Income and Other Expense, Net. Interest and other expense, net increased by $46,000 from a net expense of $20,000 in the three months ended June 30, 2021 to income of $26,000 in the three months ended June