With school security a paramount concern to many municipalities, our fully integrated technologies for the school security market continues to remain a top priority especially given the healthy margins those products generate. During, the COVID-19 pandemic we have experienced postponements of planned security upgrades but did not suffer a significant number of cancellations. With schools starting to re- open, we expect to see an uptick in activity in this sector.
School security products typically generate strong gross margins and the delay of these projects impacted our gross margins throughout fiscal 2021. The increase in sales of our Starlink radios (the hardware), which generate lower gross margins, also impacted our gross margins throughout fiscal 2021, but also lead to the very profitable recurring service revenue. With the aforementioned strong radio sales combined with delays in school security projects, what we saw in the 4th quarter as well as the full fiscal year, was a shift in product mix, with recurring revenue now representing 30% of total revenue as compared to 24% last year and door locking devices representing 38% of total revenue as compared to 45% last year. While this product mix shift, as well as the lower overhead absorption rate resulting from the previously mentioned reduction of inventories, resulted in lower hardware margins, the overall gross margin in Q4 increased to 43% vs. 35% last year and for the full fiscal year increased to 44% vs. 43% last year.
Fiscal 2021 saw the introduction of Air Access®, our new cellular, cloud-hosted access control product line. These products will allow access control integrators and locking professionals to build a recurring revenue business for themselves just like our burglar and fire alarm dealers do. While still in the very early stages, we expect this product line to provide the Company the opportunity to generate recurring service revenue from each of our divisions: alarms & connectivity, locking and access control."
Mr. Soloway concluded, "Our record-setting revenue and profitability in Q4 and fiscal 2021, along with continued strong recurring revenue margins, gives us tremendous momentum as we head into fiscal 2022. I am proud of how the NAPCO team responded to the challenges brought on by COVID-19 and of our resiliency and ability to execute even during difficult and uncertain times. We are excited for the future prospects for growth as our Company continues its efforts to expand our recurring revenue product offerings into all of our product lines. We remain focused on generating strong revenue growth as well as increased profitability. As we look to fiscal 2022 and beyond, NAPCO is well positioned for long-term growth and profitability expansion."
Financial Results
Net sales for the quarter increased 54% to a fourth quarter record of $35.4 million, as compared to $23.0 million for the same period one year ago. Net sales for the fiscal year ended June 30, 2021 increased 13% to a record $114 million, as compared to $101.4 million for the same period a year ago. Research and development costs for the quarter were $1.9 million or 5% of sales as compared to $1.9 million or 8% of sales for the same quarter a year ago. Research and development costs for the fiscal year ended June 30, 2021 increased 5% to $7.6 million or 7% of sales as compared to $7.3 million or 7% of sales last year. Selling, general and administrative expenses for the quarter increased 41% to $7.2 million or 20% of sales, as compared to $5.1 million, or 22% of sales for the same period last year. Selling, general and administrative expenses for the fiscal year ended June 30, 2021 increased 6% to $25.2 million, or 22% of sales, as compared to $23.7 million, or 23% of sales for the same period last year. Operating income for the quarter was $6.0 million as compared to an operating loss of $835,000 for the same period last year. Operating income for the fiscal year ended June 30, 2021increased 60% to $17.3 million as compared to $10.8 million for the same period a year ago. Net income for the quarter was a fourth quarter record of $5.0 million, or $0.27 per diluted share, as compared to a net loss of $1.9 million, or a loss of $0.10 per diluted share for the same period last year. Net income for the fiscal year ended June 30, 2021 increased 75% to $14.9 million, or $0.81 per diluted share, as compared to $8.5 million, or $0.46 per diluted share, for the same period last year.
Adjusted EBITDA* for the quarter increased 344% to $6.6 million, or $0.36 per diluted share, as compared to $1.5 million, or $0.08 per diluted share for the same period last year. Adjusted EBITDA* for the fiscal year ended June 30, 2021 increased 32% to $19.5 million or $1.06 per diluted share, as compared to $14.7 million, or $0.80 per diluted share for the same period last year.
Balance Sheet Summary
At June 30, 2021, the Company had $40.2 million in cash and cash equivalents and marketable securities as compared to $18.2 million as of June 30, 2020. Working capital (defined as current assets less current liabilities) was $75.8 million at June 30, 2021 as compared with working capital of $61.0 million at June 30, 2020. Current ratio (defined as current assets divided by current liabilities) was 4.8:1 at June 30, 2021, and 4.5:1 at June 30, 2020.
Conference Call Information
Management will conduct a conference call at 11 a.m. ET today, September 13,2021. Interested parties may participate in the call by dialing 1-877-407-4018 or for international callers, 1-201-689-8471, about 5-10 minutes prior to the start time of 11 a.m. ET. The conference call will also be available on replay starting at 2 p.m. ET on September 13, 2021, and ending on September 20, 2021 at 11:59 p.m. ET. For the replay, please dial 1-844-512-2921 domestically, or 1-412-317-6671 for international callers, and use the replay access code 13722862.
In addition, the call will be webcast and will be available on the Company's website at www.napcosecurity.com.