David Barnes
Senior Vice President & Chief Financial Officer at Trimble
Thank you, Rob. Let's start on 5 with a review of second quarter results. Second quarter revenue was $945 million, up 29% on a year-over-year basis. Currency translation added 3% and divestitures subtracted 1% for a total organic revenue increase of 27%. Customer demand was healthy, rebounding across all of our end markets at a rate stronger than we anticipated.
Gross margin in the second quarter was 58.2%. Gross margins were down 70 basis points year-over-year, driven by the shift in mix in our business, with a higher percentage of hardware this quarter and the onset of product cost inflation given the disruptions we are seeing in our supply chain, partially offset by lower discounting. Adjusted EBITDA margin was 26.4%, up 70 basis points, driven by higher revenue. Operating income margins expanded 110 basis points to 24.2%. As expected, our operating costs were up meaningfully from the second quarter of last year, when we had unusually low compensation expense and a very tight focus on cost control in light of the COVID lockdowns. Net income increased by 40%, and earnings per share increased by $0.20 to $0.72 per share. Our second quarter cash flow from operations was $201 million, demonstrating the continued strong cash flow generation of our business. Operating cash flow again exceeded net income in the quarter.
Free cash flow was $190 million. Our net debt decreased over $225 million in the quarter, and our net debt to adjusted EBITDA ratio fell to 1. At the end of the quarter, we had the entire $1.25 billion available on our revolving credit facility and approximately $484 million in cash. With our strong balance sheet, we are well positioned to continue to invest in our business, both organically and inorganically.
Turning now to Slide 6. I'll review in a bit more detail our second quarter revenue trends. As noted earlier, our ARR was up 11% in the quarter, with organic ARR growth of approximately 10%. Excluding our Transportation segment, Trimble ARR grew at a high teens rate in the quarter. Encouragingly, ARR trends in Transportation improved with segment organic ARR approximately flat versus a year earlier. Our nonrecurring revenue streams experienced strong growth relative to the second quarter of 2020, during which our business was most negatively impacted by the COVID-19 shutdowns.
Our Hardware revenue grew 47% year-over-year, driven by strong performance in Civil Construction, Geospatial and Agriculture. From a geographic perspective, North American revenues were up 23%. In Europe, revenues were up 41%. Currency fluctuations positively impacted growth in Europe by about 9%, with the balance coming from catch up on project activity, which has slowed in 2020, fiscal stimulus measures and recovering demand in many end markets. Asia Pacific grew 19% year-over-year, driven by strong growth in Australia and New Zealand. The Rest of World, which includes Brazil and Argentina, was up 49% year-over-year, driven principally by strong demand from the agriculture sector.
Next, on Slide 7, we highlight some of the other key metrics that we follow. Net working capital, inclusive of deferred revenue, was negative this quarter, representing approximately minus 2% of revenue on a trailing 12-month basis. Our deferred revenue grew 14% year-over-year. An important story this quarter is the growth of our backlog. Total backlog at quarter end was approximately $1.5 billion. Of that total, approximately $300 million relates to unfilled orders for hardware products. This compares with hardware backlog of about $100 million at the end of the second quarter last year, which is a more typical level for our business. In this time of both exceptionally strong customer demand and increasing supply chain pressures, our operations team did an extraordinary job, which enabled our record year-on-year Hardware revenue growth of 47%.
Turning now to Slide 8 for additional detail on each of the reporting segments. Buildings and Infrastructure revenue was up 22% on an organic basis. Revenue growth was strong in both our Building and Civil Construction businesses, with Hardware revenue across the segment up greater than 40%. Segment margins were down 40 basis points, due primarily to revenue mix. Across our recurring software offerings in this segment, bookings were strong, up approximately 25% versus a year ago. Geospatial revenue was up 48% on an organic basis. We saw a rebound in demand across nearly all of the end markets for our Geospatial offerings, and our new products are generating significant customer enthusiasm. Operating margins were up 430 basis points due to strong revenue growth and the success of new products. Resources and Utilities revenue was up 32% on an organic basis. Revenue growth was strong in Precision Agriculture and Positioning Services. Margins expanded 160 basis points.
Top line results in Transportation met our expectations. Revenue was up 9% on an organic basis year-on-year. The drivers of revenue growth were improved trends in both our mobility and enterprise businesses. Margins declined 170 basis points on a year-over-year basis due to increased mix of low-margin hardware and increased operating costs, but margins improved sequentially over first quarter levels. We remain confident that we are on track for continued sequential improvement as the year progresses.
Turning now to our outlook for the full year. Our performance in the second quarter and the strength of our backlog give us the visibility and confidence to raise our outlook for the year. I'll point out that supply chain constraints continue to present us with meaningful uncertainty as the availability of some critical components remains unpredictable. The outlook I'll describe represents our best sense of this dynamic environment. I'll also point out that comparisons versus the quarters of 2020 are difficult to draw meaning from as the impact of the onset of COVID and the recovery following market reopenings created large swings last year. We will focus more on sequential evolution from the second quarter through to the second half.
We are raising our outlook for the full year revenue to between $3.55 billion and $3.65 billion. Demand remains resilient across all of our end markets, but our Hardware revenues will likely be constrained by our ability to source key components. Note that this new revenue range incorporates our divestitures, including the recent divestitures of our Manhattan Software and IRON Solutions businesses. Divestitures will reduce our revenue growth in 2021 by a little over 100 basis points, but are reflective of our increasing focus on platforms, which connect the workflows in RT end markets. Sequentially, we expect that revenue in the second half will be well above 2020 levels, but below the levels we realized in the first half of 2021. The expectation of lower revenue in the second half versus the first half is entirely driven by constraints in our supply chain. We expect to end the year with hardware backlog at levels similar to the end of the second quarter. Given our strong bookings trends across our recurring software businesses, we expect organic ARR growth of approximately 10% for the full year.
We anticipate that second half gross margins will be down approximately 50 to 100 basis points below second half 2020 margins, due to the net impact of product mix and cost pressures, partially offset by price increases. We are implementing price increases across many of the product lines impacted by the recent inflationary spike. But overall, the net impact on gross margins will still be adverse year-over-year for both the back half and full year 2021. We expect to experience the greatest gross margin pressure in the third quarter as we won't realize the full benefit of our price increases until the fourth quarter.
Our outlook for operating margins has improved as the leverage from higher revenue more than offsets the impact of mix shift, increasing product cost inflation and the investments we are making in support of our strategy. We now expect that operating margin for the full year 2021 will be comparable to 2020. Note that our software business model transitions from perpetual to recurring are accelerating in the back half of this year. These transitions will adversely impact operating margins by 150 to 200 basis points in the second half of 2021. Our outlook for full year earnings per share has increased to $2.45 to $2.65 per share. From a cash flow perspective, given our strong performance in the first half of 2021, we expect cash flow from operations for the full year of greater than 1.1x non-GAAP net income, with free cash flow comfortably exceeding non-GAAP net income.
With that, I'll turn it over to the operator for Q&A.