And because so many families depend on us for everyday essentials at the right price, we believe products at the $1 price point are important to our customers, and they will continue to have a significant presence in our assortment.
In fact, approximately 20% of our overall assortment is $1 or less.
Net sales increased 2.8% to $8.7 billion, following a 17.6% increase in Q4 of 2020.
Comp sales declined 1.4% compared to the prior year period, which translates into a robust 11.3% increase on a two-year stack basis.
Notably, our average basket size at year-end was approximately $16 and consisted of nearly six items.
This compares to an average basket size of about $13 and five items at the end of 2019, which we believe reflects the growing impact of our strategic initiatives and a degree of inflation.
For the full year, net sales increased 1.4% to $34.2 billion, which was on the high end of our full year guidance and on top of a robust 21.6% increase in fiscal 2020.
Comp sales for the year decreased 2.8%, which translates into a very healthy 13.5% increase on a two-year stack basis.
In total, we completed more than 2,900 real estate projects during the year, including the opening of our 18,000th Dollar General store and 50 stand-alone pOpshelf locations as we continue to build and strengthen the foundation for future growth.
As a reminder, gross profit in Q4 2020 and fiscal year 2020 were both positively impacted by a significant increase in sales, including net sales growth of 24% and 28%, respectively, in our combined non-consumables categories.
For Q4 2021, gross profit as a percentage of sales was 31.2%, a decrease of 131 basis points.
Of note, while we expect some relief as we move through 2022, our Q4 supply chain expenses were significantly higher compared to Q4 2020, resulting in a headwind to gross margin of approximately $100 million.
SG&A as a percentage of sales was 22% in the quarter, a decrease of 16 basis points.
Operating profit for the fourth quarter decreased 8.7% to $797 million.
As a percentage of sales, operating profit was 9.2%, a decrease of 116 basis points.
Our effective tax rate for the quarter was 21.2% and compares to 22.7% in the fourth quarter last year.
Finally, earnings per share for the fourth quarter decreased 1.9% to $2.57, which reflects a compound annual growth rate of 10.6% over a two-year period.
Merchandise inventories were $5.6 billion at the end of the year, an increase of 7% overall and 1.4% on a per store basis.
In 2021, we generated significant cash flow from operations totaling $2.9 billion.
Total capital expenditures for the year were $1.1 billion and included our planned investments in new stores, remodels and relocations, distribution and transportation projects and spending related to our strategic initiatives.
During the quarter, we repurchased 2.2 million shares of our common stock for $490 million and paid a quarterly dividend of $0.42 per common share outstanding at a total cost of $97 million.
At the end of the year, the remaining share repurchase authorization was $2.1 billion.
Net sales growth of approximately 10%, including an estimated benefit of approximately two percentage points from the 53rd week, same-store sales growth of approximately 2.5%, and earnings per share growth of approximately 12% to 14%, including an estimated benefit of approximately four percentage points from the 53rd week.
Our earnings per share guidance assumes an effective tax rate range of 22.5% to 23%.
We also expect capital spending to be in the range of $1.4 billion to $1.5 billion, which includes the impact of increases in the cost of certain building materials, as well as continued investment in our strategic initiatives and core business to support and drive future growth.
With regards to shareholder returns, our board of directors recently approved a quarterly dividend payment of $0.55 per share, which represents an increase of 31%.
We also plan to repurchase a total of approximately $2.75 billion of our common stock this year, reflecting our continued strong liquidity position, the benefit from the 53rd week and our confidence in the long-term growth opportunity for our business.
As a reminder, we are lapping a significant stimulus benefit from Q1 2021, including gross margin expansion of 208 basis points.
To that end, we expect a comp sales decline of 1% to 2% in Q1 with an earnings per share in the range of approximately $2.25 to $2.35.
Starting with our non-consumables initiative, or NCI, which was available in more than 11,700 stores at the end of 2021.
Notably, NCI stores outperformed non-NCI stores in both average ticket and customer traffic, driving an incremental 2.5% total comp sales increase on average in NCI stores, along with a meaningful improvement in gross margin rate.
As a reminder, pOpshelf aims to engage customers by offering a fun, affordable and differentiated treasure hunt experience delivered through continually refreshed merchandise, a differentiated in-store experience and exceptional value, with the vast majority of our items priced at $5 or less.
During the quarter, we opened 25 new pOpshelf locations, bringing the total number of stores to 55 and exceeding our initial goal of 50 stores.
Additionally, we opened 11 new store within a store concepts during Q4, bringing the total number of Dollar General Market stores with a smaller-footprint pOpshelf store included to a total of 25 at the end of the year.
In 2022, we plan to nearly triple the pOpshelf store count and open up to an additional 25 store-within-a-store concepts, which would bring us to a total of more than 150 stand-alone pOpshelf locations and a total of approximately 50 store-within-a-store concepts.
We continue to anticipate year one annualized sales volumes for our current locations to be between $1.7 million and $2 million per store and expect the average gross margin rate for these stores to exceed 40%.
Overall, we are very pleased with the results from this unique and differentiated concept, and we are excited about our goal of approximately 1,000 pOpshelf locations by year-end 2025.
As a reminder, we completed the initial rollout of DG Fresh across the entire chain in 2021 and are now delivering to more than 18,000 stores from 12 facilities.
Importantly, the sales penetration of these categories has increased to approximately 9% as compared to approximately 8% prior to the rollout of DG Fresh.
And while produce is not included in our initial rollout, we continue to believe that DG Fresh provides a potential path forward to expanding our produce offering to more than 10,000 stores over time.
To that end, at the end of Q4, we offered produce in more than 2,100 stores, with plans to expand this offering to a total of more than 3,000 stores by the end of 2022.
During 2021, we added more than 65,000 cooler doors across our store base.
In 2022, we again expect to install more than 65,000 additional doors as we continue to build on our multiyear track record of growth in cooler doors and associated sales.
Turning now to an update on our expanded health offering, which consists of up to 30% more feet of selling space and up to 400 additional items as compared to our standard offering.
This offering was available in nearly 1,200 stores at the end of 2021, with plans to expand to a total of more than 4,000 stores by the end of 2022.
In 2021, we completed a total of 2,902 real estate projects, including 1,050 new stores, 1,752 remodels and 100 relocations.
For 2022, we remain on track to execute nearly 3,000 real estate projects in total, including 1,110 new stores, 1,750 remodels and 120 store relocations.
As a reminder, we expect approximately 800 of our new stores in 2022 to be in our larger, 8,500 square foot store format, allowing for an expanded assortment and room to accommodate future growth as we respond to our customers' desire for an even wider product selection.
Importantly, we continue to be very pleased with the sales productivity of all of our larger-format stores as average sales per square foot are about 15% above an average traditional store.
In addition to our planned Dollar General and pOpshelf growth in 2022, and included in our expected new store total, we are very excited about our plans to expand internationally with the goal of opening up to 10 stores in Mexico by the end of 2022.
This offering was available in more than 10,700 stores at the end of Q4, and we are very pleased with the early results, including our ability to generate profitable transactions, as well as better-than-expected customer trial, strong repurchase rates, high levels of sales incrementality and a broadening of our customer base.
To that end, we significantly grew the reach of this network in 2021, increasing from 6 million unique active profiles to more than 75 million, enabling our vendors to now reach over 90% of our DG customers through the DG Media Network.
Notably, the Save to Serve program contributed more than $800 million in cumulative cost savings from its inception in 2015 through the end of 2021.
Self-checkout was available in more than 6,100 stores at the end of 2021.
In 2022, we plan to expand this offering to a total of up to 11,000 stores by the end of the year as we look to further extend our position as an innovative leader in small box discount retail.
I also want to highlight our growing private fleet, which consisted of more than 700 tractors and accounted for approximately 20% of our outbound transportation fleet at the end of 2021.
We are focused on significantly expanding our private fleet in 2022, as we plan to more than double the number of tractors, we expect will account for approximately 40% of our outbound transportation fleet by the end of the year.
Importantly, we save an average of 20% of associated costs every time we replace a third-party tractor with one from our private fleet.
In 2022, we now expect to create more than 10,000 net new jobs as a result of our continued growth.
Our internal promotion pipeline remains robust, as evidenced by our internal placement of more than 75% of our store associates at or above the lead sales associate position.

Summary:
Net sales increased 2.8% to $8.7 billion, following a 17.6% increase in Q4 of 2020.
Comp sales declined 1.4% compared to the prior year period, which translates into a robust 11.3% increase on a two-year stack basis.
For the full year, net sales increased 1.4% to $34.2 billion, which was on the high end of our full year guidance and on top of a robust 21.6% increase in fiscal 2020.
Finally, earnings per share for the fourth quarter decreased 1.9% to $2.57, which reflects a compound annual growth rate of 10.6% over a two-year period.
Merchandise inventories were $5.6 billion at the end of the year, an increase of 7% overall and 1.4% on a per store basis.
We also expect capital spending to be in the range of $1.4 billion to $1.5 billion, which includes the impact of increases in the cost of certain building materials, as well as continued investment in our strategic initiatives and core business to support and drive future growth.
To that end, we expect a comp sales decline of 1% to 2% in Q1 with an earnings per share in the range of approximately $2.25 to $2.35.