As Bryan mentioned, once fully operational in 2027, the Arkansas facility will become our most efficient production hub, enabling us to expand capacity to support market growth and more effectively serve our channel partners.
I would now like to review our second quarter 2025 and year-to-date results. Please note that unless otherwise stated, all comparisons discussed are on a year-over-year basis compared to the second quarter of 2024. As a reminder, this is the first year of our new level-loaded manufacturing strategy, which we put in place to bring greater efficiency to our manufacturing, while also reducing the volatility typically associated with channel stocking and destocking.
This new strategy has caused lower than typical first half gross margins given the shift in production and associated utilization rates but will result in higher than historical second half of the year gross margins. Over time, we believe the level-loading strategy will be accretive to the full year gross margins.
Similar to Q1, we also incurred several one-time expenses tied to strategic initiatives, including start-up costs associated with our Arkansas plastic processing facility, railing conversion efforts and investments in digital transformation. I will provide adjusted results reflecting these items while discussing our financial performance. A reconciliation of these adjustments can be found in our Q2 press release on trex.com.
In the second quarter, net sales were $388 million, a 3% increase compared to $376 million in the prior year. Despite adverse weather slowing construction activity in many parts of the U.S. and lower Repair and Remodel spending, we achieved low single-digit growth, demonstrating the strength of the Trex brand and the adoption of our new products.
Gross profit was $158 million and gross margin was 40.8% compared to gross profit of $168 million and gross margin of 44.7%, down $10 million or 390 basis points. The decrease is primarily due to the one-time strategic investments made within the quarter as well as lower year-over-year production due to our decision to level load, which we estimate had a 100-basis point impact on the quarter. While level loading negatively impacted gross margins in Q1 and Q2, as previously noted, we will see a benefit to the margins in Q3 and Q4.
In addition, costs associated with the successful reengineering of our Enhance decking line were approximately $4 million or a 100-basis point impact but have not been adjusted out of gross margin. This project is now complete, and we do not expect any additional Enhance-related expenses going forward.
The strategic investments this quarter included one-time railing conversion costs of approximately $1.4 million and one-time start-up costs related to Arkansas facility of approximately $1.3 million. Excluding these items, adjusted gross profit was $161 million.
Selling, general and administrative expenses were $56 million or 14.4% of net sales compared to $51 million or 13.6% of net sales. The increase is primarily due to the additional investments in branding, which we are delivering positive returns as we saw an increase in dealer and contractor searches, product samples sold, and new leads.
One-time expenses related to the start-up of the Arkansas facility and digital transformation activities were approximately $1.1 million. Excluding these one-time expenses, SG&A expenses were $55 million. Net income was $76 million or $0.71 per diluted share, a decrease of 13% from $87 million or $0.80 per diluted share. Excluding the aforementioned expenses, adjusted