Keith F. Jensen
Chief Financial Officer at Fortinet
Thank you, Ken. And to add to your comments, we should note that as in the prior quarter, billings growth, product revenue growth and total revenue growth, all accelerated sequentially. In fact, all three growth rates were at five-year Fortinet highs and product revenue growth was at its highest in over nine years. Okay, let's start with a more detailed Q2 discussion with revenue. Total revenue of $801 million was up 30% driven by industry-leading product revenue growth of 41%.
The product revenue growth was broad-based across geographies, FortiGate and non-FortiGate products and across use cases illustrating market acceptance and customer demand for our integrated single platform security fabric strategy across customer infrastructures. Our financial strategy includes a Rule of 40 targets. We target the total of the revenue growth percentage and operating margin to be at least 40. In the second quarter, strong demand and execution drove this actual total to be a Rule of 55. FortiGate product revenue growth was 40%, while we continue to see robust growth from our secure SD-WAN functionality.
The majority of the growth was driven by FortiGate revenue from other capabilities, which are embedded in the FortiGate operating system. Non-FortiGate product revenue growth was over 40% for the second consecutive quarter and was driven by from our Integrated Security Fabric products. One additional comment on our product revenue growth, the product revenue growth was a reflection of our continued strong organic growth, and not the result of a few large deals, drawing down backlog, nor an unusual number of delayed transactions from the prior quarter or pulled into future periods.
Service revenue of $503 million was up 24%. Support and related services revenue of $230 million was up 26%, while security subscription services revenue of $273 million was up 23%. Moving to the mix of FortiGate and non-FortiGate platform revenue, FortiGate product and services revenue increased 26%, driven by very strong demand for both branch and high-end FortiGate products.
High-end products included 10 MP7 powered FortiGate models, representing approximately 25% of high-end FortiGate shipments. Our ASIC-driven FortiGates give customers five times to 10 times more computing power than firewalls running on common CPUs. The advanced computing power creates additional speed and capacity to continue to add functionality to our operating system, further driving our price for performance advantage.
The combination of the ASIC Advantage and the common operating system across products can enable vendor consolidation, lowering total cost of ownership and increasing automation. Non-FortiGate products and services revenue grew 39% and accounted for approximately 30% of total revenue, up over two percentage points.The Integrated Security Fabric consists of a complete range, which closed -- reversal for all our hands meeting later on today. So you've got an inside scoop on what Patrice is going to say. We start again, if I may. Non-FortiGate products and services revenue grew 39% and accounted for approximately 30% of total revenue, up over two percentage points.
The Integrated Security Fabric consists of a complete range of form factors and delivery methods, including physical and virtual methods, including physical and virtual appliances, cloud, SaaS and perpetual software, as well as hosted and nonhosted solutions. Together, they provide a range of security solutions and form factors, enabling integrated protection for the hybrid environments and the expanding digital attack surface from network data centers to endpoints to the cloud.
Let's turn to revenue by geo. The summary is on slide 5. Revenue in EMEA increased 34%. The Americas revenue increased 29% and APAC posted revenue growth of 24%. The Product revenue growth for both the Americas and EMEA regions was over 40%.
Moving to billings. Second quarter billings were $961 million, up 35%. We saw strong growth in both the FortiGate and non-FortiGate segment of the Security Fabric platform. The FortiGate segment delivered billings growth of over 30%, accounting for 71% of total billings.
As shown on slide 6, branch and high-end FortiGates posted very strong billings growth. The non-FortiGate segment accounted for over 29% of total billings and delivered billings growth of over 45%, driving a two-point mix shift to non-FortiGate products and services. Given the continued strong performance, we believe our non-FortiGate platform is on a pace to be a $1 billion business this year. Secure SD-WAN billings, represented 14% of total billings and is a key functionality for an integrated SASE solution.
In terms of billings by geo, EMEA outperformed all geos, followed by the Americas and APAC. Europe had a very good quarter, and growth in the Americas was driven by the United States, which was up sequentially by more than 30 percentage points. Latin America continued to recover from the pandemic-induced slowdown, closing billings growth in the mid-20s for the second consecutive quarter.The average contract term was approximately 28 months, up two months from the second quarter of 2020 and one month in the first quarter of 2021. Deals over $1 million increased from 59 to 79, and the pipeline for deals over $1 million continues to look good for the remainder of the year. Secure SD-WAN deals over $1 million increased from 13 to 19.
Moving to worldwide billings by industry verticals. Billings by vertical illustrate diversification in our business model and importantly, suggest the current threat landscape is driving security investments in industries that may have historically shown lower investment levels. For example, the verticals that have historically not been in our top five combined for billings growth of over 75%. Service providers accounted for 14% of total billings and were up 25%.
Moving back to the income statement. Product revenue growth of 41% drove a three point shift in the product and services revenue mix. And along with it, a gross margin decrease of 160 basis points to 77.5%. Product gross margin improved 70 basis points to 61.7%. Services gross margin decreased 160 basis points to 86.9% with data center investments in FX accounting for about 100 basis points of the impact. Operating margin of 25.4% was at the top end of the guidance range despite a 350 basis point headwind from the gross margin decline, a weaker US dollar and increased travel and marketing event costs. We ended the quarter with a total headcount of 9,043, an increase of 17%.
Moving to the statement of cash flow summarized on slide 7 and 8. Free cash flow for the second quarter came in at a quarterly record of $395 million, benefiting from strong revenue growth, good month one linearity and lower capital expenditures. In the quarter, we repurchased approximately 455,000 shares of common stock for a total cost of $92 million at an average share price of approximately $201. The remaining share repurchase authorization at the end of the second quarter was 921 million with the authorization set to expire at the end of February 2022. We ended the first half of the year with total cash and investments of $3.4 billion, an increase of $1.7 billion. The increase includes the proceeds from our $1 billion investment-grade debt issuance during the first quarter of 2021.
DSOs returned to pre-pandemic levels, decreasing seven days year-over-year and 15 days quarter-over-quarter to 66 days. Inventory returns increased to 2.7 times from 2.2 times, reflecting strong product sales in the quarter. Capital expenditures for the quarter were $24 million, and we have started to move into the new Sunnyvale building. We estimate third quarter capital expenditures to be between $65 million and $75 million, which includes a $30 million payment for the new campus building. We estimate 2021 capital expenditures to be between $175 million and $200 million. With the acceleration of the growth and a little more understanding of the post-pandemic work patterns, we're turning our attention to reviewing our facilities footprint and the needed office and warehouse capacity in the US and Canada. As we work through this process, it is possible that our estimated capital expenditures over the next few quarters will increase as we prepare for the next phase of our growth.
Looking forward, our goal remains to balance growth and profitability. And given the growth opportunities that we believe lie ahead, we continue to expect to tilt our bias within this framework more towards growth for at least the next several quarters. The opportunities we see are supported by a strong pipeline, increased sales effectiveness, the growing success with a single integrated security platform strategy and the convergence of security and networking, the response to the current threat environment and our development efforts, which include continuing to invest in our ASIC advantage, which enables a shared operating system across the Security Fabric platform drives our price for performance advantage, increase the capacity to add features and functions while maintaining price points.
And now I can review our outlook for the third quarter, summarized on slide 9, which is subject to disclaimers regarding forward-looking information that Peter provided at the beginning of the call. For the third quarter, we expect billings in the range of $940 million to $960 million; revenue in the range of $800 million to $815 million. Non-GAAP gross margin of 77.5% to 78.5%, non-GAAP operating margin of 24.5% to 25.5%, which includes an estimated 200 basis point headwind from foreign exchange and increased travel and marketing costs.
Non-GAAP earnings per share of $0.90 to $0.95, which assumes a share count of between $169 million and $171 million. We expect a non-GAAP tax rate of 21%. With that, we are raising our 2021 guidance and expect billings in the range of $3.870 billion to $3.920 billion, which the midpoint represents growth of approximately 26%. Revenue in the range of $3.210 billion to $3.250 billion, which at the midpoint represents growth of approximately 24.5%.
Total service revenue in the range of $2.045 billion to $2.075 billion, which represents growth of approximately 23% and it implies full year product revenue growth of approximately 28%. Non-GAAP gross margin of 77% to 79%, non-GAAP operating margins of 25% to 27%, which includes an estimated 200 basis point headwind from foreign exchange and increased travel and marketing costs.
Non-GAAP earnings per share of $3.75 to $3.90, which assumes a share count of between 168 million and 170 million. We expect our non-GAAP tax rate to be 21%. We expect cash taxes to be approximately $90 million. Along with Ken, I'd like to thank our partners, customers and the Fortinet team for all their hard work, execution and outstanding success in the first half of 2021.
I'll now hand the call back over to Peter for the Q&A session.