For over 80 years, Dollar General has served our customers [Technical Issues] through a unique combination of value and convenience.
We remain committed to being part of the solution during these difficult times, and believe we are uniquely positioned to continue supporting our customers through our expansive network of nearly 17,000 [Technical Issues] within 5 miles or more than 75% of the US population.
As announced in today's release, we invested approximately $13 million in employee appreciation bonuses during the quarter, bringing our total incremental investment in appreciation bonuses to about $73 million through the end of Q2.
Additionally, we expect to invest up to $50 million in additional financial incentives in the second half of the year.
To further advance these efforts, we recently expanded our diversity and inclusion team and announced the combined $5 million pledge with the Dollar General Literacy Foundation to support racial and social justice and education.
In terms of our monthly comp cadence, sales increased 21.5% in May, 17.9% in June and 17.2% in July.
Overall second quarter net sales increased 24.4% to $8.7 billion driven by comp sales growth of 18.8%.
During the quarter, our highly consumable market share trends as measured by syndicated data continued to exhibit strength, including strong double-digit increases in both units and dollars over the 4-week, 12-week, 24-week and 52-week periods ending July 25th, 2020.
We're particularly pleased that we once again delivered significant operating margin expansion, which contributed to second quarter diluted earnings per share of $3.12, an increase of 89% over the prior year.
Gross profit as a percentage of sales was 32.5% in the second quarter, an increase of 167 basis points.
SG&A as a percentage of sales was 20.4%, a decrease of 205 basis points or 161 basis points compared to Q2 2019 adjusted SG&A.
As I mentioned, we also recorded expenses of $31 million in Q2 2019 reflecting our estimate for the settlement of certain legal matters.
Moving down the income statement, operating profit for the second quarter was $1 billion, an increase of 80.5% or 71.3% compared to Q2 2019 adjusted operating profit.
As a percentage of sales, operating profit was 12%, an increase of 373 basis points or 329 basis points compared to Q2 2019 adjusted operating profit.
Operating profit in the second quarter was positively impacted by COVID-19 primarily through higher sales.
The benefit from higher sales was partially offset by approximately $38 million of incremental investments that we made in response to the pandemic, including additional measures taken to further protect our employees and customers and approximately $13 million in appreciation bonuses for eligible frontline employees.
Our effective tax rate for the quarter was 21.5% and compares to 22.9% in the second quarter last year.
Finally, as Todd noted earlier, earnings per share for the second quarter was $3.12, which represents an increase of 89% or 79% compared to Q2 2019 adjusted EPS.
Merchandise inventories were $4.4 billion at the end of the second quarter, essentially flat overall, and down 6% on a per store basis.
Year-to-date through Q2, we generated significant cash flow from operations totaling $2.9 billion, an increase of $1.8 billion or 157%.
Total capital expenditures through the first half were $424 million and included our planned investments in new stores, remodels and relocations and spending related to our strategic initiatives.
As a result, we finished the quarter with $3 billion of cash and cash equivalents and $1.1 billion of availability under our undrawn revolving credit facility.
During the quarter, we repurchased 3.2 million shares of our common stock for $602 million and paid a quarterly dividend of $0.36 per common share outstanding at a total cost of $90 million.
With today's announcement of an incremental share repurchase authorization, we have remaining authorization of approximately $2.5 billion under the repurchase program.
As a result, we are not providing guidance for fiscal 2020 sales or earnings per share at this time.
With regards to share repurchases, we now expect to repurchase approximately $2.5 billion of our common stock this year, reflecting our strong liquidity position and confidence about the long-term growth opportunity for our business.
Overall, we now expect to open 1,000 new stores, remodel 1,670 stores and relocate 110 stores representing 2,780 real estate projects in total.
Finally, we are increasing our expectations for capital spending in 2020 to a range of $1 billion to $1.1 billion as we accelerate key initiatives and continue to invest in our core business to support and drive future growth.
Since the end of Q2 and through August 25th, we have continued to experience elevated same-store sales, which have increased by approximately 15% during this timeframe.
Finally, we expect to make additional investments in the second half as a result of COVID-19 including up to $50 million in employee appreciation bonuses which Todd mentioned, as well as investments in additional safety measures.
During the first half we added more than 30,000 cooler doors across our store base.
In total, we now expect to install more than 60,000 cooler doors this year compared to our previous target of 55,000 cooler doors in 2020.
This offering is now available in approximately 6,400 stores with plans to expand more than 7,000 stores by year-end.
This convenient, package pick up and drop off service is now available in over 8,000 locations.
We now expect to complete our initial rollout to more than 8,500 stores by the end of Q3, further advancing our long track record of serving rural communities.
Over the past year, we've increased the number of items tagged by more than 40%, and we continue to focus on leveraging technology to drive even higher levels of in-store execution.
During the first half, we opened 500 new stores, remodeled 973 stores including 704 in the higher cooler count DGTP or DGP formats and relocated 43 stores.
We also added produce in more than 120 stores, bringing the total number of stores which carry [Phonetic] produce to more than 870.
As John noted, we now expect 2,780 real estate projects in total this year, as we continue to deploy capital in these high return investments while delivering an expanded assortment offering to an additional 200 communities in 2020.
In total, for fiscal 2020, we now expect to invest up to $123 million in appreciation bonuses for eligible frontline employees to provide them with further support and demonstrate our continued appreciation for their exceptional efforts during these difficult times.
As a reminder, these bonuses follow our 2017 investment of nearly $70 million in store manager compensation and training, as well as prior and continued investments in employee training, benefits and wages.
We also held our annual leadership meeting earlier this month, and I was amazed by the team's ability to seamlessly transition to a virtual event resulting in continued development for more than 1,500 leaders of our Company.
The NCI offering was available in approximately 4,300 stores at the end of Q2, and we continue to be very pleased with the strong sales and margin performance we are seeing across our NCI product categories.
In fact, this performance is contributing to an incremental 8% comp sales increase in total non-consumable sales compared to stores without the NCI offering, as well as a meaningful improvement in gross margin rate in these stores.
As a result of our strong performance in learnings to date, our plans now include accelerating the rollout of our NCI offering to more than 5,400 stores by the end of 2020.
By incorporating a lite [Phonetic] version of this initiative into approximately 400 stores.
We are pleased with the success we are seeing on this front, driven by higher overall in-stock levels and the introduction of more than 55 additional new items including both the national and private brands in select stores being serviced by DG Fresh.
In total, we were self-distributing to more than 12,000 stores from eight -- excuse me, from eight DG fresh facilities at the end of Q2.
Given our success and strong execution to date, we now expect to capture benefits from DG Fresh in approximately 14,000 stores from at least ten facilities by the end of this year.
This compares to our previous expectation of approximately 12,000 stores by year's end.
During the quarter, we accelerated the rollout of DG Pickup, our Buy Online Pickup in the Store offering to more than 2,500 stores compared to about 40 stores at the end of Q1 with plans for even more aggressive expansion as we move ahead.
Self checkout is currently available in approximately 400 stores compared to more than 30 stores at the end of Q1.

Summary:
Overall second quarter net sales increased 24.4% to $8.7 billion driven by comp sales growth of 18.8%.
We're particularly pleased that we once again delivered significant operating margin expansion, which contributed to second quarter diluted earnings per share of $3.12, an increase of 89% over the prior year.
Operating profit in the second quarter was positively impacted by COVID-19 primarily through higher sales.
Finally, as Todd noted earlier, earnings per share for the second quarter was $3.12, which represents an increase of 89% or 79% compared to Q2 2019 adjusted EPS.
Merchandise inventories were $4.4 billion at the end of the second quarter, essentially flat overall, and down 6% on a per store basis.
As a result, we finished the quarter with $3 billion of cash and cash equivalents and $1.1 billion of availability under our undrawn revolving credit facility.
During the quarter, we repurchased 3.2 million shares of our common stock for $602 million and paid a quarterly dividend of $0.36 per common share outstanding at a total cost of $90 million.
As a result, we are not providing guidance for fiscal 2020 sales or earnings per share at this time.
Since the end of Q2 and through August 25th, we have continued to experience elevated same-store sales, which have increased by approximately 15% during this timeframe.