Ita Brennan
Chief Financial Office at Arista Networks
Thanks, Jayshree, and good afternoon.
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 $707.3 million, up 30.8% year-over-year and well above the upper end of our guidance of $675 million to $695 million. Shipments remained [Technical Issues] constrained in the period as we continue to carefully navigate industry-wide supply chain shortages and COVID-related disruptions. Services and subscription software contributed approximately 22.3% of revenue in the second quarter, up from 21.4% in Q1. International revenues for the quarter came in at $193.2 million, or 27% of revenue, up from 25% in the first quarter. This shift in the geographical mix on a quarter-over-quarter basis reflected strong international deployments by our cloud titan and specialty cloud customers, combined with a healthy performance from our in-region businesses.
Overall gross margin in Q2 was 65.2%, above the upper end of our guidance range of approximately 63% to 65%. While we recognized some incremental supply chain costs in the period, these were more than offset by a healthy mix of enterprise and software revenue for the quarter.
Operating expenses for the quarter were $189.8 million, or 26.8% of revenue, up from last quarter at $180.9 million. R&D spending came in at $119.6 million, or 16.9% of revenue, up from last quarter at $110 million. This reflected increased employee-related costs and higher new product introduction spending in the period. Sales and marketing expense was $57.9 million [Phonetic], or 8.2% of revenue, down from $59.5 million last quarter with lower demo-related expenses in the period. As a reminder, we continue to benefit from lower COVID-related travel and marketing expenses. Our G&A costs came in at $12.3 million, or 1.7% of revenue, consistent with last quarter.
Our operating income for the quarter was $271.7 million, or 38.4% of revenue.
Other income and expense for the quarter was a favorable $1.7 million. And our effective tax rate was approximately 20.7%, reflecting an improved geographical mix. Other income and expenses for the quarter included approximately $2 million of interest income, offset by some unfavorable FX amounts. This resulted in net income for the quarter of $216.8 million, or 30.6% of revenue. Our diluted share number was 79.71 million shares, resulted in a diluted earnings per share number for the quarter of $2.72, up approximately 29% from the prior year.
Now, turning to the balance sheet. Cash, cash equivalents and investments ended the quarter at approximately $3.3 billion. We did not repurchase shares of our common stock during the second quarter. As a recap, we have now repurchased $763 million, or 3.6 million shares, against our Board authorization to repurchase $1 billion worth of shares over three years, commencing in Q2 '19. We will continue to execute opportunistically against the remaining mandate.
Turning to operational cash performance for the second quarter. We generated $263 million of cash from operations in the period, reflecting solid net income performance and continued investments in inventory and supply chain.
DSOs came in at 47 days, down from 51 days in Q1, reflecting the linearity of billings in the period.
Inventory turns were 1.7 times, down slightly from last quarter at 1.8. Inventory increased to $543.2 million in the quarter, up from $483.2 million in the prior period, as we continue to buffer certain components and products.
Our total deferred revenue balance was $746 million, up from $720 million in Q1. The majority of the deferred revenue balance is service related and is directly linked to the timing and term service renewals, which can vary on a quarter-by-quarter basis. Approximately $90 million of the balance, up from $70 million last quarter, represents product deferred revenue, largely related to acceptance clauses for new products across various customers and sectors. As a reminder, we expect 2021 to be a year of significant new product introductions, combined with the healthy new customer acquisition rates and expanded use cases with existing customers. These trends, in conjunction with reduced levels of upfront in price and testing, may result in increased customer specific acceptance clauses and increased volatility in our product deferred revenue amounts.
Accounts payable days were 53.7 days, up from 52.3 days in Q1, reflecting the timing of inventory receipts and payments.
Capital expenditures for the quarter were $4.5 million.
Now, turning to the outlook for the third quarter and beyond. We reported strong year-over-year revenue growth of approximately 29% for the first half of 2021, reflecting healthy demand across all our market sectors combined with favorable comparisons from the first half of 2020. While we expect continued strength and demand as we move through the second half, we will likely see some deceleration in year-over-year revenue growth, given the top-line recovery experienced in the back half of 2020.
Turning to gross margin. Industry supply constraints continue to pressure component costs. Some of these incremental costs will initially be recorded as inventory and only be recognized in the income statement when the products are sold in future period. With this as context, we will continue to reiterate our gross margin outlook of 63% to 65%, with customer mix remaining the key driver of volatility on a quarter-by-quarter basis.
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 regard to cash flow, we expect to fund approximately $40 million of capex in the third quarter for the purchase of land to build a data center and engineering location in Santa Clara. We'll provide more details of this project over the coming quarters.
Finally, our outlook discussion -- discussed above and our guidance for Q3 reflects our current understanding of COVID-19 and its impact to our business and supply chain. This remains an inherently uncertain situation and we will need to continue to monitor and attempt to mitigate new challenges as the situation unfolds.
With all of this as a backdrop, our guidance for the third 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 $725 million to $745 million; gross margin of 63% to 65%; operating margin of approximately 37%. Our effective tax rate is expected to be approximately 21.5%, with diluted shares of approximately 80 million shares.
I will now turn the call back to Charles. Charles?