The quarter was highlighted by net sales growth of 16% in our combined nonconsumable categories, a 208 basis point increase in gross margin rate and double-digit growth in diluted EPS.
And we believe we are uniquely positioned to continue supporting our customers through our unique combination of value and convenience, including our network of more than 17,000 stores located within 5 miles of approximately 75% of the US population.
As we lapped our most difficult quarterly comp sales comparison of the year, net sales decreased 0.6% to $8.4 billion, driven by a comp sales decline of 4.6%.
Notably, comp sales on a 2-year stack basis increased a robust 17.1%, which compares to the 15.9% 2-year stack we delivered last quarter.
From a monthly cadence perspective, comp sales increased 5.7% in February despite a headwind from inclement weather across the country.
For the month of March, which represents our most difficult monthly sales comparison of the year, comp sales declined 11.2%.
Comp sales declined 4.3% in April, and while year-over-year growth in nonconsumable sales moderated in comparison to March, they were positive overall despite a more challenging lap.
Of note, comp sales growth of 11.3% in our combined nonconsumable categories and 29.8% on a comparable 2-year stack basis significantly exceeded our expectation and speaks to the continued strength and sustained momentum in these product categories, enhanced by the benefit from stimulus.
As Todd already discussed sales, I will start with gross profit, which we believe was positively impacted in the quarter by a significant benefit to sales, particularly in our nonconsumables categories from the most recent round of government stimulus payments.
Gross profit as a percentage of sales was 32.8% in the first quarter.
As Todd noted, this was an increase of 208 basis points and represents our eighth consecutive quarter of year-over-year gross margin rate expansion.
SG&A as a percentage of sales was 22%, an increase of 152 basis points.
Operating profit for the first quarter increased 4.9% to $908.9 million.
As a percentage of sales, operating profit was 10.8%, an increase of 56 basis points.
Our effective tax rate for the quarter was 22% and compares to 22.2% in the first quarter last year.
Finally, earnings per share for the first quarter increased 10.2% to $2.82, which reflects a compound annual growth rate of 38% over a 2-year period.
Merchandise inventories were $5.1 billion at the end of the first quarter, an increase of 24.2% overall and a 17.6% increase on a per store basis as we cycled a 5.5% decline in inventory on a per store basis, driven by extremely strong sales volumes in Q1 2020.
The business generated significant cash flow from operations during the quarter totaling $703 million, a decrease of 60% but which reflects a compound annual growth rate of 11% over a 2-year period.
Total capital expenditures for the quarter were $278 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 5 million shares of our common stock for $1 billion and paid a quarterly cash dividend of $0.42 per common share outstanding at a total cost of $100 million.
At the end of Q1, the remaining share repurchase authorization was $1.7 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.
Moving to an update on our financial outlook for fiscal 2021.
For 2021, we now expect the following: net sales in the range of a 1% decline to an increase of 1%; a same-store sales decline of 5% to 3% but which reflects growth of approximately 11% to 13% on a 2-year stack basis and earnings per share in the range of $9.50 to $10.20, which reflects a compound annual growth rate in the range of approximately 20% to 24% or in the range of approximately 19% to 23% compared to the 2019 adjusted diluted earnings per share over a 2-year period, which is well above our long-term goal of delivering at least 10% annual earnings per share growth on an adjusted basis.
Our earnings per share guidance continues to assume an effective tax rate in the range of 22% to 23%.
With regards to share repurchases, we now expect to repurchase approximately $2.2 billion of our common stock this year compared to our previous expectation of about $1.8 billion.
From the end of Q1 through May 23, comp sales declined by approximately 7% as we continue to cycle extremely difficult prior year comparisons.
As a reminder, comp sales growth for the month of May in 2020 was 21.5%.
Also, please keep in mind the second and third quarters represent our most challenging laps of the year from a gross margin rate perspective, following improvements of 167 basis points in Q2 2020 and 178 basis points in Q3 2020.
Additionally, we continue to expect about $60 million to $70 million incremental year-over-year investments in our strategic initiatives this year as we further their rollouts.
This amount includes approximately $23 million in incremental investments made during the first quarter.
The NCI offering was available in over 7,300 stores at the end of Q1, and we remain on track to expand this offering to a total of more than 11,000 stores by year end, including over 2,100 stores in our light version, which incorporates a vast majority of the NCI assortment but through a more streamlined approach.
Notably, this performance is contributing to an incremental comp sales increase in nonconsumable sales of 8% in our NCI stores and 3% in our NCI Lite stores as compared to stores without the NCI offering.
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.
In fact, year one annualized sales volumes for our first eight locations are trending between $1.7 million and $2 million per store, with an average gross margin rate of about 40%, which we expect will climb as we continue to scale this exciting initiative.
As a reminder, this compares to year one sales volumes of about $1.4 million for a traditional Dollar General store and a gross margin rate of about 32% for the overall chain in 2020.
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-within-a-store concepts, which incorporates a smaller footprint pOpshelf shop into one of our larger-format Dollar General market stores.
Importantly, we currently estimate there are about 3,000 pOpshelf store opportunities potentially available in the Continental United States.
In total, at the end of Q1, we were delivering to more than 17,000 stores from 10 facilities and now expect to complete our initial rollout across the chain by the end of Q2, which is ahead of our previous expectation of year-end as communicated on our Q4 call.
During the quarter, we added nearly 18,000 cooler doors across our store base and are on track to install approximately 65,000 cooler doors this year.
In the first quarter, we completed a total of 836 real estate projects, including 260 new stores, 543 remodels and 33 relocations.
In addition, we now have produce in more than 1,300 stores.
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.
We also now plan to add produce in more than 1,000 stores, which compares to our previous expectation of approximately 700 stores.
As a reminder, we recently made key changes to our development strategy, including establishing two of our larger footprint formats, which each comprise about 8,500 square feet of selling space as our base prototypes for nearly all new stores going forward.
With about 1,200 square feet of additional selling space compared to a traditional store, these larger formats allow for expanded high-capacity cooler counts, an extended queue line and a broader product assortment, including NCI, a larger health and beauty section with about 30% more feet of selling space and produce in select stores.
We are especially pleased with the sales productivity of these larger formats as average sales per square foot are currently trending about 15% above an average traditional store, which bodes well for the future as we look to grow these unit counts in the years ahead.
In total, we expect more than 550 of our real estate projects this year will be in these formats as we look to further enhance our value and convenience proposition while driving additional growth.
Self-checkout was available in more than 3,400 stores at the end of Q1, which represents more than double the store count at the end of Q4.
In fact, more than 12,000 of our current store managers are internal promotes, and we continue to pursue innovative opportunities to further develop our teams, including our recent announcement to partner with a leading training provider to deliver more personalized training solutions to our employees.

Summary:
As we lapped our most difficult quarterly comp sales comparison of the year, net sales decreased 0.6% to $8.4 billion, driven by a comp sales decline of 4.6%.
As Todd already discussed sales, I will start with gross profit, which we believe was positively impacted in the quarter by a significant benefit to sales, particularly in our nonconsumables categories from the most recent round of government stimulus payments.
Finally, earnings per share for the first quarter increased 10.2% to $2.82, which reflects a compound annual growth rate of 38% over a 2-year period.
Merchandise inventories were $5.1 billion at the end of the first quarter, an increase of 24.2% overall and a 17.6% increase on a per store basis as we cycled a 5.5% decline in inventory on a per store basis, driven by extremely strong sales volumes in Q1 2020.
During the quarter, we repurchased 5 million shares of our common stock for $1 billion and paid a quarterly cash dividend of $0.42 per common share outstanding at a total cost of $100 million.
Moving to an update on our financial outlook for fiscal 2021.
For 2021, we now expect the following: net sales in the range of a 1% decline to an increase of 1%; a same-store sales decline of 5% to 3% but which reflects growth of approximately 11% to 13% on a 2-year stack basis and earnings per share in the range of $9.50 to $10.20, which reflects a compound annual growth rate in the range of approximately 20% to 24% or in the range of approximately 19% to 23% compared to the 2019 adjusted diluted earnings per share over a 2-year period, which is well above our long-term goal of delivering at least 10% annual earnings per share growth on an adjusted basis.
With regards to share repurchases, we now expect to repurchase approximately $2.2 billion of our common stock this year compared to our previous expectation of about $1.8 billion.
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.