We experienced ongoing strength in metals pricing during the first quarter, led by multiple price increases for carbon steel products, along with improving demand in many markets, and leveraged our decentralized operating structure, small order sizes and diversification of products, end markets and geographies to achieve record gross profit margin for the third consecutive quarter of 33.6%, up 60 basis points from the fourth quarter of 2020 and up 330 basis points from the first quarter of 2020.
Our record quarterly gross profit margin, combined with average selling prices well above our expectations and our continued focus on expense control, contributed to record pre-tax income of $359 million in the first quarter of 2021, up over 100% from the prior quarter and up over 300% from the prior year period.
Our quarterly earnings per diluted share of $4.12 were also a record and substantially exceeded our outlook.
Our strong earnings and effective working capital management resulted in cash flow from operations of $161.8 million in the first quarter of 2021 despite $182.8 million of working capital investment.
We improved our inventory turn rate to 5.4 times, surpassing our 2020 annual rate and companywide turn goal of 4.7 times.
Our 2021 capital expenditure budget of $245 million includes new buildings and other projects to expand, upgrade and maintain many of our existing operating facilities.
However, when factoring in project delays and extended lead times for equipment due to COVID-19, we believe our potential cash flow outlays for our capital expenditure will be closer to $300 million in 2021 due to the prior year holdover spending.
During the first quarter of 2021, we invested $43.7 million back into our business through capital expenditures, including several growth opportunities to address and exceed our customers' and suppliers' needs.
During the first quarter of 2021, we paid $44.8 million in dividends to our stockholders.
We've maintained our payment of regular quarterly dividends for 62 consecutive years without ever suspending payments or reducing our dividend rate.
In fact, we've increased our dividend 28 times since our 1994 IPO, including the most recent increase of 10% in the first quarter of 2021.
At March 31, 2021, approximately 2.8 million shares remained available for repurchase under our stock repurchase program.
Strong demand conditions in the majority of our end markets resulted in our tons sold increasing 11.3% compared to the fourth quarter, which was within our guidance range of up 10% to 12% and above the typical seasonal improvement in shipping volumes we experienced in the first quarter.
While demand is healthy and continues to improve in most markets, our first quarter shipments did not reach pre-pandemic levels and were down 4% from the first quarter of 2020.
However, on a per day basis, our tons sold were down only 2.5%.
Our average selling price increased 20% compared to the fourth quarter of 2020, exceeding our guidance of up 12% to 14% by a significant margin.
These robust demand and pricing conditions contributed to an all-time high quarterly gross profit margin of 33.6%.
On a non-GAAP FIFO basis, which we believe is the best measure of our day-to-day operating performance, we achieved a record gross profit margin of 37.1%, an increase of 350 basis points compared to the prior quarter and up 600 basis points from the first quarter of 2020.
We entered the second quarter of 2021 with strong demand and pricing momentum that creates an environment for us to optimize our model and deliver strong results.
The significant increase in metal pricing and healthy demand resulted in our first quarter sales increasing 33% over the fourth quarter of 2020.
Compared to the prior year period, our first quarter sales were up over 10%, supported by the strong pricing momentum for most carbon steel products.
As Jim and Karla mentioned, the strong pricing environment, along with our focus on higher-margin orders and continued investments in value-added processing capabilities, collectively resulted in record quarterly gross profit of $953.7 million and a record gross profit margin of 33.6% in the first quarter of 2021.
We incurred LIFO expense of $100 million in the first quarter of 2021.
This compares to LIFO income of $20 million in the first quarter of 2020 and LIFO expense of $15.5 million in the fourth quarter of 2020.
At the end of the first quarter, our LIFO reserve on our balance sheet was $215.6 million.
We revised our annual LIFO expense estimate to $400 million from $340 million primarily due to higher-than-anticipated costs for certain carbon steel products.
As such, our current projected LIFO expense for the second quarter of 2021 is $100 million.
Our SG&A expense was generally consistent with traditional seasonal trends, increasing $54.9 million or 11.8% compared to the fourth quarter of 2020 due to strong volume and pricing momentum.
In comparison to the prior year period, SG&A expense was roughly flat due to lower wages as a result of reduced head count, which was down approximately 8% year-over-year, and was offset by higher incentive compensation due to record earnings levels in the first quarter of 2021 and to a lesser extent, inflationary increases.
Our non-GAAP pre-tax income of $357.1 million in the first quarter of 2021 was the highest in our company's history and represents an increase of $136.5 million or 61.9% from the first quarter of 2020 due to favorable demand and pricing conditions, strong execution and diligent expense management.
Our non-GAAP pre-tax income margin of 12.6% was also a record and exceeded the prior year period by 400 basis points.
Our effective income tax rate for the first quarter of 2021 was 25.3%, up from 24.3% in the first quarter of 2020 mainly due to higher profitability.
We currently anticipate a full year 2021 effective income tax rate of 25%.
As a result of all these factors, we generated record quarterly earnings per share of $4.12 in the first quarter of 2021 compared to $0.92 in the first quarter of 2020.
On a non-GAAP basis, our first quarter earnings of $4.10 per share significantly exceeded our outlook and were up 104% from $2.01 in the fourth quarter of 2020 and up 67.3% from $2.45 in the first quarter of 2020.
We generated strong cash flow from operations of $161.8 million during the first quarter of 2021 due to our profitable operations and effective working capital management, including our focus on inventory turns.
As of the end of the first quarter, our total debt outstanding was $1.66 billion, resulting in a net debt-to-EBITDA multiple of 0.85.
We had no borrowings outstanding on our $1.5 billion revolving credit facility, providing us with ample liquidity to continue executing on all areas of our capital allocation strategy while maintaining our investment-grade credit rating.
Despite these factors, we estimate tons sold will be flat to up 2% in the second quarter of 2021 compared to the first quarter of 2021.
Since current metal prices are substantially higher than the average selling price in the first quarter of 2021, we estimate our average selling price per ton sold for the second quarter of 2021 will be up 5% to 7%.
Given the strong demand and pricing fundamentals, we anticipate continued strength in our gross profit margin in the second quarter of 2021.
Based on these expectations, we currently anticipate non-GAAP earnings per diluted share in the range of $4.20 and to $4.40 for the second quarter of 2021.

Summary:
Our quarterly earnings per diluted share of $4.12 were also a record and substantially exceeded our outlook.
We entered the second quarter of 2021 with strong demand and pricing momentum that creates an environment for us to optimize our model and deliver strong results.
As a result of all these factors, we generated record quarterly earnings per share of $4.12 in the first quarter of 2021 compared to $0.92 in the first quarter of 2020.
On a non-GAAP basis, our first quarter earnings of $4.10 per share significantly exceeded our outlook and were up 104% from $2.01 in the fourth quarter of 2020 and up 67.3% from $2.45 in the first quarter of 2020.
Since current metal prices are substantially higher than the average selling price in the first quarter of 2021, we estimate our average selling price per ton sold for the second quarter of 2021 will be up 5% to 7%.
Given the strong demand and pricing fundamentals, we anticipate continued strength in our gross profit margin in the second quarter of 2021.
Based on these expectations, we currently anticipate non-GAAP earnings per diluted share in the range of $4.20 and to $4.40 for the second quarter of 2021.