We were also very pleased with the increase in the recurring revenue annual run rate, which increased to $67 million based on July 2023 recurring revenues compared to an annual run rate of $63 million based on April 2023 recurring revenues.
Our net income of $10.6 million in Q4 was a record-breaker for any quarter in the Company’s history and represents 24% of our net sales. Adjusted EBITDA* for Q4 was also an all-time quarterly record of $13.0 million and our Adjusted EBITDA* margin for the quarter was 29%.
Our balance sheet continues to get stronger, with cash and cash equivalents, other investments and marketable securities increasing 43% to $66.7 million as compared to $46.8 million at June 30, 2022 and 17% as compared to Q3, which was $57 million. We have no debt at June 30, 2023. Our net cash provided by operating activities almost doubled to $24.7 million over last year.
School security continues to be a major concern to many in the country. With 131,000 K-12's and 5,300 colleges and universities in the U.S, the need for improved security measures is greater than ever, and increased federal and state funding continues to be available to aid most schools and school districts. We were pleased to learn that the University of Arizona recently installed over 700 of our Trilogy electronic locks on their campus. It was approximately nine months ago that a University of Arizona professor was killed inside one of the buildings on campus, by a former student. Incidents such as this have proliferated around our country. As such, our fully integrated technologies for school security continues to remain a top priority for NAPCO and we remain focused on penetrating this market.
NAPCO's record breaking results, for both Q4 and for the fiscal year 2023, is primarily the result of the continued growth and profitability from recurring revenue as well as the strong sales from our Alarm Lock and Marks locking product lines. While radio sales have slowed down when compared to the prior year, when the impending 3G Verizon sunset was approaching, radio sales still represent almost 20% of total hardware sales. As we enter fiscal 2024, we expect radio sales to continue to be a key contributor to our hardware sales and lead to the continued growth of our highly profitable recurring revenue. “
Mr. Soloway concluded "While we are not satisfied with the 2023 gross margin for hardware sales of 18%, we are pleased that we still managed to generate $27 million in net income which represents 16% of net sales and $34 million of Adjusted EBITDA which equates to an Adjusted EBITDA margin of 20%. As we enter into fiscal 2024, we believe that most of the additional material and freight costs due to the supply chain crisis, are behind us. That should lead to much improved hardware gross margins going forward, and we saw indications of that in our fourth quarter. We are pleased to continue and increase our dividend program as the Company’s cash position continues to grow and our balance sheet keeps getting stronger. As always, we will strive to accomplish our goal of continued financial strength, product innovation, technical superiority, and strong profitability, for fiscal 2024 and beyond".
Financial Results
Net sales for the quarter increased 3% to $44.7 million (the highest Q4 in the Company’s history), as compared to $43.2 million for the same period one year ago. Net sales for the twelve months increased 18% to a record $170.0 million, as compared to $143.6 million for the same period one year ago. Research and development costs for the quarter increased 12% to $2.4 million or 5% of sales as compared to $2.1 million or 5% of sales for the same period a year ago. Research and development costs for the twelve months increased 16% to $9.3 million or 5% of sales as compared to $8.0 million or 6% of sales for the same period a year ago. Selling, general and administrative expenses for the quarter remained relatively constant at $8.9 million or 20% of net sales, as compared to $8.9 million, or 21% of sales for the same period last year. Selling, general and administrative expenses for the twelve months increased 2% to $33.6 million or 20% of net sales, as compared to $32.9 million, or 23% of sales for the same period last year.
Operating income for the quarter increased 44% to $11.8 million as compared to $8.2 million for the same period last year. Operating income for the twelve months ended June 30, 2023 increased 66% to $30.3 million as compared to $18.2 million for the same period last year. Net income for the quarter was a quarterly record $10.6 million or $0.28 per diluted share as compared to $7.5 million or $0.20 per diluted share for the same period last year, a 40% increase and represents 24% of net sales. Net income for the twelve months was $27.1 million or $0.73 per diluted share as compared to $19.6 million or $0.53 per diluted share for the same period last year, a 39% increase and represents 16% of net sales.
Adjusted EBITDA* for the quarter was a quarterly record $13.0, million, or $0.35 per diluted share, as compared to $9.3 million, or $0.25 per diluted share for the same period last year, a 41% increase and equates to an Adjusted EBITDA margin of 29%. Adjusted EBITDA* for the twelve months was $34.3, million, or $0.93 per diluted share, as compared to $22.6 million, or $0.61 per diluted share for the same period last year, a 52% increase and equates to an Adjusted EBITDA margin of 20%.
Net income and earnings per share for last year's twelve month period reflected Other income of $3.9 million which resulted from extinguishment of debt during the quarter ended September 30, 2021. Without such benefit, net income and earnings per share for the twelve months ended June 30, 2022 would have been $15.7 million and $0.43, respectively.
Balance Sheet Summary