Chantelle Breithaupt
Chief Financial Officer at Arista Networks
Thanks, Jayshree. It really was great to see everyone at the New York Stock Exchange IPO celebration event. Now turning to the numbers. This analysis of our Q2 results and our guidance for Q3 is based on non-GAAP and excludes all non-cash stock-based compensation impacts, certain acquisition-related charges and other non-recurring items. A full reconciliation of our selected GAAP to non-GAAP results is provided in our earnings release.
Total revenues in Q2 were $1.69 billion, up 15.9% year over year, significantly above the upper end of our guidance of $1.62 billion to $1.65 billion. Growth was delivered across all three sectors of cloud, enterprise and providers. Services and subscription software contributed approximately 17.6% of revenue in the quarter, up from 16.9% in Q1. International revenues for the quarter came in at $316 million or 18.7% of total revenue, down from 20.1% in the prior quarter. This quarter-over-quarter decrease was driven by a relatively weaker performance in our APJ region. The overall gross margin in Q2 was 65.4%, above our guidance of 64%, up from 64.2% last quarter and up from 61.3% in the prior year quarter. The year-over-year gross margin improvement was primarily driven by a reduction in inventory-related reserves.
Operating expenses for the quarter were $319.8 million or 18.9% of revenue, up from last quarter at $265 million. R&D spending came in at $216.7 million or 12.8% of revenue, up from $164.6 million in the last quarter. This primarily reflected increased headcount and higher new product introduction costs in the period. Sales and marketing expense was $85.1 million or 5% of revenue compared to $83.7 million last quarter, with a double-digit percentage increase of headcount in the quarter versus the prior year.
Our G&A costs came in at $18 million or 1.1% of revenue, up from last quarter at $16.7 million. Our operating income for the quarter was $785.6 million or 46.5% of revenue. Other income and expense for the quarter was a favorable $70.9 million, and our effective tax rate was 21.5%. This resulted in net income for the quarter of $672.6 million or 39.8% of revenue. Our diluted share number was 319.9 million shares, resulting in a diluted earnings per share number for the quarter of $2.10, up 32.9% from the prior year.
Turning to the balance sheet. Cash, cash equivalents and investments ended the quarter at $6.3 billion. In the quarter, we repurchased $172 million of our common stock at an average price of $282.20 per share. Of the $172 million, $82 million was repurchased under our prior $1 billion authorization, which is now complete, and the remaining $90 million was purchased under the new program of $1.2 billion approved in May 2024. The actual timing and amount of future repurchases will be depended upon market and business conditions, stock price and other factors.
Now, turning to operating cash performance for the second quarter. We generated $989 million of cash from operations in the period, reflecting strong earnings performance with a favorable contribution from working capital. DSOs came in at 66 days, up from 62 days in Q1, impacted by large service renewals at the end of the quarter. Inventory turns were 1.1 times, up from 1 turn last quarter. Inventory decreased to $1.9 billion in the quarter, down from $2 billion in the prior period, reflecting a reduction in our raw materials inventory. Our purchase commitments and inventory at end of the quarter totaled $4 billion, up from $3.5 billion at the end of Q1. We expect this number to stabilize as supplier lead times improve, but we'll continue to have some variability in future quarters as a reflection of demand for our new product introductions.
Our total deferred revenue balance was $2.1 billion, up from $1.7 billion in Q1. 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. Our product deferred revenue increased approximately $253 million versus last quarter. As a reminder, we expect 2024 to be a year of new product introductions, new customers and expanded use cases. These trends may result in increased customer trials and contracts with customer-specific acceptance clauses and increase the variability and magnitude of our product deferred revenue balances. Accounts payable days was 46 days, up from 36 days in Q1, reflecting the timing of inventory receipts and payments. Capital expenditures for the quarter were $3.2 million.
As we enter the second half of fiscal year 2024, we are encouraged by the momentum that we see in the market. Our existing innovative product portfolio, along with our new product introductions, are well suited for our cloud, AI, enterprise and providers customers. We will continue to invest in our R&D and go-to-market through both people and processes. With all of this as a backdrop for fiscal year '24, our revenue growth guidance is now at least 14%. Gross margin outlook remains at 62% to 64%, and operating margin is now raised to approximately 44%.
Our guidance for the third quarter based on non-GAAP results and excluding any noncash stock-based compensation impacts and other nonrecurring items is as follows: revenues of approximately $1.72 billion to $1.75 billion, gross margin of approximately 63% to 64% and operating margin at approximately 44%. Our effective tax rate is expected to be approximately 21.5%, with diluted shares of approximately 321 million shares.
With that, I now turn the call back to Liz. Liz?