Our momentum continued this quarter with comparable sales up 2.2% for the total company and 2.6% for the U.S. on top of over 30% growth last year.
Our elevated product assortment across our home decor offerings are resonating with consumers, resulting in particularly strong performance in appliances and flooring and contributing to an 11% increase in ticket over $500.
Pro once again outpaced DIY this quarter with Pro growth over 16% and over 43% on a two-year basis.
For the past 18 months, the home has increased in importance for all of us and perhaps especially for our baby boomer customers, who are increasingly interested in aging in place in their own homes.
Sales grew 25% on top of 106% growth in the third quarter of 2020, which represents a 9% sales penetration this quarter and a two-year comp of 158%.
Our recognition for the first time in 17 years as Fortune's Most Admired Specialty Retailer and our inclusion as one of the top three marketers of the year in Ad Age's annual list means that we are well positioned to put our vendor partners at the forefront of the home lifestyle movement, helping them to capitalize on the shift in consumer behavior and sentiment toward the home.
During the quarter, operating margin expanded approximately 240 basis points, leading to diluted earnings per share of $2.73, which is a 38% increase as compared to adjusted diluted earnings per share in the prior year.
This year, we're celebrating our centennial with a $10 million investment in 100 communities across the country with projects ranging from renovating homeless shelters, updating youth centers and addressing unique needs for communities all around the country.
You can go to Lowes.com and see a full list of all 100 community projects.
This is demonstrated by the $1 billion in discounts that we give our military families in our country this year through our Military Discount program.
And I'm very pleased to announce that for the seventh consecutive quarter, 100% of our stores earned a Winning Together profit-sharing bonus.
This $138 million payout to our frontline hourly associates is $70 million above the target payment level and reflects our appreciation for the hard work of our hourly workforce.
In the third quarter, U.S. comparable sales increased 2.6% and 33.7% on a two-year basis as our Total Home strategy continues to gain traction with our DIY and Pro customers.
Growth continued to be broad-based on a two-year basis with all product categories up more than 17% in that time frame.
In our home decor division, appliances and flooring delivered standout performances as we leveraged our competitive in-stock positions and updated product assortments to deliver strong positive comps on top of 20% growth in these categories last year.
Customers also invested in outdoor entertainment and upgrading their outdoor living spaces, as well as holiday decorations for their homes and yards, driving strong positive comps in seasonal and outdoor living and lawn and garden, resulting in two-year comps over 43% in each category.
1 position in outdoor power equipment to deliver over 20% growth in battery-operated outdoor power equipment.
We delivered sales growth of 25% in the quarter and 158% on a two-year basis.
As Marvin mentioned, this quarter, 100% of our stores earned their Winning Together profit-sharing bonus, resulting in a payout of $138 million to our frontline hourly associates.
As a veteran, I'm particularly proud of the commitment to the 10% discount for active-duty service members and our veterans and their families every single day with no purchase limit.
In Q3, we generated $1.9 billion in free cash flow, driven by better-than-expected operating results.
Capital expenditures totaled $410 million in the quarter as we invest in our strategic initiatives to drive the business and support long-term growth.
We returned $3.4 billion to our shareholders through a combination of both dividends, as well as share repurchases.
During the quarter, we paid $563 million in dividends at $0.80 per share.
Additionally, we repurchased 13.7 million shares for $2.9 billion and have over $10.7 billion remaining on our share repurchases authorization.
And today, I'm excited to announce that we are now planning to repurchase an incremental $3 billion of shares in Q4.
This will bring our total share repurchases to approximately $12 billion for the full year, a clear reflection of our commitment to driving long-term value for our shareholders.
Our balance sheet remains very healthy with $6.1 billion in cash and cash equivalents at quarter end.
Adjusted debt-to-EBITDAR stands at 2.14 times, well below our long-term stated target of 2.75 times.
In the quarter, we reported diluted earnings per share of $2.73, an increase of 38% compared to adjusted diluted earnings per share last year.
In the quarter, sales were $22.9 billion with a comparable sales increase of 2.2%.
Comparable average ticket increased 9.7% driven primarily by higher-ticket sales of appliances and flooring, as well as product inflation.
Year-to-date, commodity inflation had lifted total sales by approximately $2.1 billion and improved comp growth by 300 basis points.
In the quarter, comp transaction count declined 7.5% due to lower sales to DIY customers of smaller-ticket items, as well as lower DIY lumber unit sales.
Comp transactions increased 16.4% last year, which resulted in a two-year comp transaction increase of 7.7%.
We delivered growth of over 16% in Pro, 25% on Lowes.com and positive comps across all home decor categories.
U.S. comp sales increased 2.6% in the quarter and was up 33.7% on a two-year basis.
monthly comp sales were down 0.4% in August, up 1.1% in September and up 7.7% in October.
From 2019 to '21, August sales increased 28.4%, September increased 33.3% and October increased 40%.
Gross margin was 33.1% of sales in the third quarter, up 38 basis points from last year.
Product margin rate declined 25 basis points.
In addition, higher credit revenue benefited margins by 60 basis points, while improved shrink contributed 20 basis points of benefits this quarter.
These benefits were partially offset by 30 basis points of increased supply chain costs due to higher importation and transportation costs, as well as the expansion of our omnichannel capabilities.
SG&A at 19.1% of sales levered 230 basis points versus LY due to better-than-expected sales and disciplined expense management.
We incurred $45 million of COVID-related expenses in the quarter, as compared to $290 million of COVID-related expenses last year.
The $245 million reduction in these expenses generated 110 basis points of SG&A leverage.
Additionally, we incurred $100 million of expenses related to the U.S. stores reset in the third quarter of last year.
As we did not incur any material expense related to this project this year, this generated 50 basis points of SG&A leverage compared to LY.
And finally, we've generated approximately 50 basis points of favorable SG&A leverage from our PPI initiatives.
For the quarter, operating profit was $2.8 billion, adding $600 million or a 28% increase over last year.
Operating margin of 12.2% of sales for the quarter increased approximately 240 basis points over LY driven by improved SG&A leverage and higher gross margin rate.
The effective tax rate was 26.1%.
At the end of the quarter, inventory was $16.7 billion, which is $1 billion higher than the third quarter of 2020 when our in-stock positions were pressured due to strong consumer demand and COVID-related supply constraints.
Our improved expectations for 2021 include sales of approximately $95 billion for the year, representing two-year comparable sales growth of approximately 33%.
This compares to our prior expectations of approximately $92 billion of sales, which represents approximately 30% comparable sales growth on a two-year basis.
With higher projected sales levels and our productivity efforts taking hold, we are raising our outlook for operating income margin to 12.4% from 12.2% for the full year.
We expect capital expenditures of up to $2 billion for the year.
And as I mentioned earlier, we're now planning to return excess capital to shareholders via an additional $3 billion in share repurchases in Q4.
This will bring our total share repurchases to approximately $12 billion for the full year, which is higher than our original expectations of $9 billion due to better-than-anticipated performance.

Summary:
Our momentum continued this quarter with comparable sales up 2.2% for the total company and 2.6% for the U.S. on top of over 30% growth last year.
During the quarter, operating margin expanded approximately 240 basis points, leading to diluted earnings per share of $2.73, which is a 38% increase as compared to adjusted diluted earnings per share in the prior year.
In the third quarter, U.S. comparable sales increased 2.6% and 33.7% on a two-year basis as our Total Home strategy continues to gain traction with our DIY and Pro customers.
In the quarter, we reported diluted earnings per share of $2.73, an increase of 38% compared to adjusted diluted earnings per share last year.
In the quarter, sales were $22.9 billion with a comparable sales increase of 2.2%.
U.S. comp sales increased 2.6% in the quarter and was up 33.7% on a two-year basis.
Our improved expectations for 2021 include sales of approximately $95 billion for the year, representing two-year comparable sales growth of approximately 33%.
We expect capital expenditures of up to $2 billion for the year.