Ita Brennan
Chief Financial Officer at Arista Networks
Thanks, Jayshree, and good afternoon. This analysis of our Q2 and full-year 2021 results and our guidance for Q1 2022 is based on non-GAAP and excludes all non-cash stock-based compensation impacts, certain acquisition-related charges, and other non-recurring items. In addition, all share-related numbers are provided on a post-split basis to reflect the 4-for-1 stock split completed in November 2021. A full reconciliation of our selected GAAP to non-GAAP results is provided in our earnings release.
Total revenues in Q4 were $824.5 million, up 27.1% year over year and well above the upper end of our guidance of $775 million to $795 million. We continue to see strong demand across all our market sectors, with particular strength from our cloud titan customers as we ramp our new products. Shipments remained constrained in the quarter as we continued to carefully navigate industry-wide supply shortages and COVID-related disruptions. Services and subscription software contributed approximately 21.2% of revenue in the fourth quarter, roughly in line with Q3. International revenues for the quarter came in at $242.1 million, or 29% of total revenue, up from 25% in the third quarter. This completes a year of strong international performance with international revenues for the year growing 46% on a year-over-year basis. This reflects healthy performance with our in-region customers, combined with solid contributions from our larger cloud titan customers.
Overall, gross margin in Q4 was 64.3%, just above the midpoint of our guidance range of approximately 63% to 65%. We continued to recognize incremental supply chain costs in the period and began to see an increase in cloud titan revenue mix in the quarter. Operating expenses for the quarter were $206.2 million, or 25% of revenue, up from last quarter at $192.4 million. R&D spending came in at $130.3 million, or 15.8% of revenue, up from last quarter at $125 million. This primarily reflected increased headcount and employee-related costs in the period. Sales and marketing expense was $61.2 million or 7.4% of revenue compared to $55.8 million last quarter, with increased headcount and higher variable compensation expenses. As a reminder, we continue to benefit from lower COVID-related travel and marketing expenses.
Our G&A costs came in at $14.7 million, or 1.8% of revenue. Our operating income for the quarter was $324.2 million, or 39.3% of revenue. Other income and expense for the quarter was a favorable $1.5 million, and our effective tax rate was approximately 19.4%. This resulted in net income for the quarter of $262.4 million, or 31.8% of revenue. Our diluted share number was 319.75 million shares, resulting in a diluted earnings per share number for the quarter of $0.82, up approximately 32.3% from the prior year.
Now turning to the balance sheet. Cash, cash equivalents, and investments ended the quarter at approximately $3.4 billion. We repurchased $176 million of our common stock during the fourth quarter at an average price of $113 dollars per share. As a recap, this completes the April 2019 $1 billion repurchase authorization, having repurchased a total of 16.7 million shares at approximately $60 per share. In addition, we initiated repurchases against the October 2021 billion dollar board authorization, purchasing $72.9 million, or 590,000 shares in the quarter at an average price of $124 per share. The actual timing and amount of future repurchases will be dependent on market and business conditions, business requirements, stock price, acquisition opportunities and other factors.
Now turning to operating cash performance for the fourth quarter we generated $225 million of cash from operations in the period, completing our first year with cash generation in excess of $1 billion. This reflects the strong earnings and cash flow potential of our business model even in a period of increasing investments in inventory and supply chain DSOs came in at 58 days, up from 49 days in Q3, reflecting the linearity of billings and deferred revenue growth in the period. Inventory turns were consistent with last quarter at 1.7 times inventory increased to $650.1 million in the quarter, up from $575.7 million in the prior period, reflecting increased component buffers and some added inventory costs.
Our purchase commitments for the quarter were $2.8 billion, up from $2.1 billion in Q3. This is in response to increased lead times now extending into 2023 and continued strength in demand. As a reminder, we continue to prioritize newer, early-life-cycle products for inclusion in these strategies in order to help mitigate the risk of excess or obsolescence. Our total deferred revenue balance was $929 million, up from $800 million in Q3. The majority of the deferred revenue balance is services related and directly linked to the timing and term of service contracts, which can vary on a quarter-by-quarter basis. Approximately, $160 million of the balance, up from $113 million last quarter, represents product deferred revenue, largely related to acceptance clauses for new products, most recently with our larger cloud titan customers.
As a reminder, we remain in a period of significant new product introductions combined with healthy new customer acquisition rate and expanded use cases with existing customers. These trends in conjunction with reduced levels of upfront in-person testing have resulted in increased customer-specific acceptance clauses and higher product deferred revenue amounts. Accounts payable days were 63 days, up from 47 days in Q3, reflecting the timing of inventory receipts and payments. Capital expenditures for the quarter were $8.5 million.
Now turning to our outlook for the first quarter and beyond. As outlined at our Analyst Day, we expect to achieve year-over-year revenue growth for 2022 of approximately 30%. This reflects continued healthy demand across all our market sectors tempered by the impact of a difficult supply environment. On the gross margin front, we see continued industry-wide supply constraints and elevated logistics costs with some offset from customer price increases. While we expect gross margins for the first quarter to be in the range of 63% to 64%, we would highlight the potential negative impact of customer mix in future quarters. If we are successful in improving supply enabling our cloud titan contribution to accelerate, it would likely result in gross margins below the typical guidance range.
Now turning to spending and investments. We remain committed to growing our investments in R&D to support innovation across the business and sales and marketing to support our go-to-market expansion. With all of this as a backdrop, our guidance for the first quarter, which is based on non-GAAP results and excludes any non-cash stock-based compensation impacts and other non-recurring items is as follows: revenues of approximately $840 million to $860 million, gross margin of 63% to 64%, and operating margin at approximately 38%. Our effective tax rate is expected to be 21%, with diluted shares on a post-split basis of approximately 320 million shares.
I will now turn the call back to Venk. Venk?