I'm pleased to report Teradata delivered a solid second quarter, worldwide sales and operational execution as well as our continued cost discipline resulted in year-over-year growth and outperformance in key financial and operational metrics, including 157% growth in public cloud ARR as well as growth in recurring revenue, non-GAAP earnings per share and free cash flow.
Since June of 2020, we've experienced more than 50% growth in cloud customers, and we are adding new logos in each of our three geographic regions.
Our top 10 customers in terms of cloud ARR at the end of June last year grew significantly year-on-year.
Here's one recent example, a world-leading manufacturer of consumer electronics is using QueryGrid to enable business agility throughout its extended data ecosystem with new functionality and enhancements to QueryGrid, performance was improved by orders of magnitude from 10 to 15 hours to just over three minutes.
Our report notes are pledged to the UN Global Compact principles of ethical behavior and human rights, a careful monitoring and reduction of greenhouse gas emissions and specifically, the reduction of total Scope one and Scope two emissions of about 40% since 2018.
The company scored 90 out of 100 and we are using the inputs and learning how to better support our LGBTQ colleagues.
Our sales and product teams executed well, delivering in line with our outlook and growing public cloud ARR by 157% year-over-year and growing recurring revenue by 16% year-over-year as reported.
Our operational execution was very efficient across the Board, driving an operating margin of 23.8% and non-GAAP earnings per share of $0.74, which is above the previous outlook.
Enabling us to generate $219 million in free cash flow.
These digital transformation activities resulted in total ARR growing by 9% year-over-year as reported and by 7% year-over-year in constant currency.
Total ARR grew by $22 million sequentially.
Public cloud ARR grew by $15 million sequentially, of which more than half resulted from customers migrating to Vantage in the cloud from on-premises perpetual and subscription licenses.
We saw strong growth in subscription ARR, driving a 20% increase year-over-year and approximately a 5% increase sequentially.
Total revenue was $491 million, a 7% increase year-over-year and 4% in constant currency, driven by strength in all three revenue components.
We continue to build on a higher base of recurring revenue, growing 16% year-over-year and 13% in constant currency.
Similar to last quarter, the economic structure of these arrangements resulted in the upfront recognition of approximately $22 million in recurring revenues in the second quarter.
This $22 million was approximately $4 million higher than what we forecasted in our second quarter outlook and will lower recurring revenue in the next three quarters by approximately $7 million per quarter.
Second quarter gross margin expanded to 64.8%, which was approximately six percentage points higher than last year's second quarter primarily for four reasons.
Second quarter operating margin expanded to 23.8%, significantly ahead of what we anticipated, driven by the combination of benefits flowing through gross margin and a lower cost structure as a result of last year's cost actions and continued cost discipline.
Total operating expenses were down 2% year-over-year and flat sequentially.
Second quarter earnings per share of $0.74 and exceeded our outlook range of $0.47 to $0.49 by $0.26 at the midpoint.
Of the $0.26, $0.18 flows through to full year EPS.
The remaining $0.08 only benefit the second quarter.
The $0.08 includes the $0.03 from additional upfront recurring revenues, $0.02 from currency, $0.02 from cost delays and $0.01 related to tax rate and weighted average share assumptions.
We have already exceeded our annual free cash flow outlook with first half free cash flow of $324 million.
In the second quarter, greater operational efficiency on cash collections resulted in free cash flow of $219 million.
Second quarter DSO was 55 days, which was 12 days better than last quarter and 13 days better than last year.
While we look to maintain our collection efficiency, we view 55 days as exceptional and generally not sustainable.
In the second quarter, we repurchased approximately 850,000 shares for $36 million in total.
For the first half of the fiscal year, we spent $121 million on share repurchases or a return of 37% of year-to-date free cash flow to shareholders.
For the full year, we anticipate returning approximately 50% of free cash flow to shareholders via share repurchases while continuing to make investments in the company to support our strategy for profitable growth and cloud acceleration.
The incremental investments are anticipated to have a $0.02 to $0.03 impact on earnings per share in each quarter in the second half.
The outlook for the third quarter of fiscal 2021 is public cloud ARR is expected to grow at least 90% year-over-year or by at least $15 million sequentially.
Non-GAAP earnings per diluted share to be in the range of $0.30 to $0.34, the fiscal second quarter operational outperformance about $0.04 flows through a sustainable improvement in the quarter, offset by the incremental investments I previously mentioned.
We anticipate the tax rate to be between 17% and 18% and a weighted average shares outstanding to be between 113 million and 114 million.
Public cloud ARR growth is expected to be at least 100% and total ARR growth is expected to be in the mid- to high single-digit percentage range.
Total revenue is now anticipated to grow in the low to mid-single-digit percentage range year-over-year.
Non-GAAP earnings per diluted share is expected to be in the range of $1.92 to $1.96.
We anticipate the tax rate to be approximately 23% and the weighted average shares outstanding to be between 113 million and 114 million.
Free cash flow for the year is now expected to be at least $400 million.

Summary:
Our operational execution was very efficient across the Board, driving an operating margin of 23.8% and non-GAAP earnings per share of $0.74, which is above the previous outlook.
Total revenue was $491 million, a 7% increase year-over-year and 4% in constant currency, driven by strength in all three revenue components.
Second quarter earnings per share of $0.74 and exceeded our outlook range of $0.47 to $0.49 by $0.26 at the midpoint.
The $0.08 includes the $0.03 from additional upfront recurring revenues, $0.02 from currency, $0.02 from cost delays and $0.01 related to tax rate and weighted average share assumptions.
Non-GAAP earnings per diluted share to be in the range of $0.30 to $0.34, the fiscal second quarter operational outperformance about $0.04 flows through a sustainable improvement in the quarter, offset by the incremental investments I previously mentioned.
Total revenue is now anticipated to grow in the low to mid-single-digit percentage range year-over-year.
Non-GAAP earnings per diluted share is expected to be in the range of $1.92 to $1.96.