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 for our customers and they will continue to have a significant presence in our assortment.
In fact, approximately 20% of our overall assortment remains at $1 or less.
As the largest retailer in the US by store count, with over 18,000 stores located within five miles of about 75% of the US population, we believe our presence in local communities across the country provides another distinct advantage and positions us well for continued success.
First, as you saw in our release, we expect to execute a total of nearly 3,000 real estate projects in 2022, including 1,100 new store openings as we continue to lay and strengthen the foundation for future growth.
Of note, these plans include the acceleration of our pOpshelf concept, as we expect to nearly triple our store count next year, as compared to our fiscal '21 year-end target of up to 50 locations.
Targeting a total of about 1,000 pOpshelf locations by fiscal year-end 2025.
Finally, as previously announced, we recently introduced our digital services by partnering with DoorDash to provide delivery in under an hour, in over 10,000 locations.
Net sales increased 3.9% to $8.5 billion following a 17.3% increase in Q3 of 2020.
Comp sales declined 0.6% to the prior year quarter, which translates to a robust 11.6% increase on a two-year stack basis.
As a reminder gross profit in Q3 2020 was positively impacted by a significant increase in sales, including net sales growth of 24% in our combined non-consumable categories.
For Q3 2021, gross profit as a percentage of sales was 30.8%, a decrease of 57 basis points, but an increase of 121 basis points, compared to Q3 2019.
SG&A as a percentage of sales was 22.9%, an increase of 105 basis points.
The quarter also included $16 million of disaster-related expenses attributable to Hurricane Ida.
Operating profit for the third quarter decreased 13.9% to $665.6 million.
As a percentage of sales, operating profit was 7.8%, a decrease of 162 basis points.
And while the unusual and difficult prior year comparison create pressure on our operating margin rate, we're very pleased with the improvement of 78 basis points, compared to Q3 2019.
Our effective tax rate for the quarter was 22.2% and compares to 21.6% in the third quarter last year.
Finally, earnings per share for Q3 decreased 10% to $2.08, which reflects a compound annual growth rate of 21% over a two-year period.
Merchandise inventories were $5.3 billion at the end of the third quarter, an increase of 5.4% overall and a decrease of 0.1% on a per store basis.
Year-to-date through [Phonetic] the third quarter, we generated significant cash flow from operations totaling $2.2 billion.
Capital expenditures to the first three quarters were $779 million 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 1.6 million shares of our common stock for $360 million and paid a quarterly dividend of $0.42 per common share outstanding at a total cost of $97 million.
At the end of Q3, the total remaining authorization for future repurchases was $619 million.
We announced today that our Board has increased this authorization by $2 billion.
We also remain committed to returning significant cash to shareholders through anticipated share repurchases and quarterly dividend payments, all while maintaining our current investment grade credit rating and managing to a leverage ratio of approximately 3 times adjusted debt-to-EBITDA.
For 2021, we now expect the following: Net sales growth of approximately 1% to 1.5%; a same-store sales decline of approximately 3% to 2.5%, but which reflects growth of approximately 13% to 14% on a two-year stack basis; and earnings per share in the range of $9.90 to $10.20, which reflects a compound annual growth rate in the range of 22% to 24% or approximately 21% to 23%, compared to 2019 adjusted earnings per share over a two-year period.
Our earnings per share guidance now assumes an effective tax rate of approximately 22%.
With regards to SG&A, we continue to expect about $70 million to $80 million, an incremental year-over-year investments in our strategic initiatives.
This amount includes $56 million in incremental investments made during the first three quarters of 2021.
The NCI offering was available in nearly 11,000 stores at the end of Q3, and we continue to be very pleased with the strong performance we are seeing across our NCI store base.
Notably, this performance is contributing an incremental 2.5% total comp sales increase on average in NCI stores along with a meaningful improvement in gross margin rate, as compared to stores without the NCI offering.
Overall, we now plan to expand this offering to a total of more than 11,500 stores by year-end, including over 2,000 stores in our light version.
pOpshelf aims to engage customers by offering a fun, affordable and differentiated treasure hunt experience, delivered through continually refreshed merchandise, a unique in-store experience and exceptional value with the vast majority of our items priced at $5 or less.
During the quarter we added 14 new pOpshelf locations, bringing the total number of stores to 30.
Opened our first 14 store within a store concepts and celebrated the one-year anniversary of our first pOpshelf store opening.
For 2021, we remain on track to have a total of up to 50 pOpshelf locations by year-end, as well as up to an additional 25 store with an in-store concepts, which incorporate a smaller footprint pOpshelf shop into one of our larger format Dollar General market stores.
In fact, we anticipate year one annualized sales volumes for our current locations to be between $1.7 million and $2 million per store and expect the initial average gross margin rate for these stores to exceed 40%.
We believe this bodes well for the future as we move toward our goal of about 1,000 pOpshelf locations by year-end 2025.
As a reminder, we completed the initial rollout of DG Fresh across the entire chain in Q2, and are now delivering to more than 18,000 stores from 12 facilities.
With regards to our cooler expansion program, during the first three quarters we added more than 52,000 cooler doors across our store base.
In total, we expect to install approximately 65,000 additional cooler doors in 2021.
Turning now to an update on our expanded health offering, which consist of about 30% more feet of selling space and nearly 400 additional items, as compared to our standard offering.
This offering was available in nearly 800 stores at the end of Q3, with plans to expand to approximately 1,000 stores by year-end.
We recently celebrated a significant milestone with the opening of our 18,000 stores, which reflects the fantastic work of our best-in-class real estate team, as we continue to expand our footprint and further enhance our ability to serve additional customers.
Through the first three quarters, we completed a total of 2,386 real estate projects, including 798 new stores, 1,506 remodels and 82 relocations.
For 2021, we remain on track to open 1,050 new stores, remodel 1,750 stores and relocate 100 stores, representing 2,900 real estate projects in total.
In addition, we now have produce in approximately 1,900 stores with plans to expand this offering to a total of over 2,000 stores by year-end.
For 2022 we plan to execute 2,980 real estate projects in total, including 1,110 new stores, 1,750 remodels and 120 store relocations.
We also plan to add produce and approximately 1,000 additional stores next year with the goal of ultimately expanding this offering to a total of up to 10,000 stores over time.
Of note, we expect approximately 800 of our new stores in 2022 to be in our larger 8,500 square foot new store prototype, allowing for a more optimal assortment and room to accommodate future growth.
Importantly, we continue to be very pleased with the sales productivity of this larger format, as average sales per square foot continue to trend about 15% above an average traditional store.
Our 2022, real estate plans also include opening approximately 100 additional pOpshelf locations, bringing the total number of pOpshelf stores to about 150 by year-end, as well as, up to an additional 25 store with in-store concept.
As Todd noted, we are also very excited about our plans to expand our footprint internationally for the first time, with plans to open up to 10 stores in Mexico by year-end 2022.
In fact, across our Dollar General, pOpshelf and DGX format types, we estimate there are approximately 17,000 new store opportunities potentially available in the Continental United States alone.
Of note, we ended Q3 with over 4.4 million monthly active users on the app, and expect this number to grow as we look to further enhance our digital offerings.
Looking ahead, our plans now include expanding this offering to over 6,000 stores by year-end 2021, and to the majority of our store base by the end of 2022, as we look to further extend our position as an innovative leader in small box discount retail.
As evidenced in 2022, we plan to create more than 8,000 net new jobs.
In fact, over 75% of our store associates at/or above the lead sales associate position were internally placed.

Summary:
Net sales increased 3.9% to $8.5 billion following a 17.3% increase in Q3 of 2020.
Finally, earnings per share for Q3 decreased 10% to $2.08, which reflects a compound annual growth rate of 21% over a two-year period.
For 2021, we now expect the following: Net sales growth of approximately 1% to 1.5%; a same-store sales decline of approximately 3% to 2.5%, but which reflects growth of approximately 13% to 14% on a two-year stack basis; and earnings per share in the range of $9.90 to $10.20, which reflects a compound annual growth rate in the range of 22% to 24% or approximately 21% to 23%, compared to 2019 adjusted earnings per share over a two-year period.