partner with our distribution channel to bring Trex's expanded portfolio of railing products to the market, and investments in digital transformation aimed at enhancing the consumer experience.
I will provide adjusted results reflecting these items while discussing financial performance. A reconciliation of these adjustments can be found in our press release on Trex.com.
In the first quarter, net sales were $340 million, a decrease of 9% compared to $374 million, but better than expected due to the continued demand for our premium products. As a reminder, last year's net sales included a $40 million benefit from a channel inventory build ahead of the decking and railing season that did not repeat this year and we ended the quarter with channel inventories in line with where we expected as we head into the busy season.
Gross profit was $138 million and gross margin was 40.5% compared to gross profit of $170 million and gross margin of 45.4%, down $32 million or 490 basis points. The decrease was primarily due to three factors: railing conversion costs, lower year-over-year production as we level load our facilities and as noted earlier, we improved our entry level Enhance decking boards to optimize performance and refine the aesthetic appeal. This refinement required changes to our production process, which impacted Q1 margins and we expect will impact Q2 margins. Trex's unrelenting focus on continuous improvements partially offset these impacts.
Adjusted gross profit, which excludes railing conversion costs of approximately $4 million, was $142 million.
Selling, general and administrative expenses were $56 million, or 16.5% of net sales compared to $51 million or 13.5% of net sales. The increase was due to additional investments in branding and new product innovation, which continue to deliver strong results. Excluding expenses related to the startup of Arkansas facility and digital transformation activities, SG&A expenses were $55 million or 16% of net sales.
Net income was $60 million or $0.56 per diluted share, a decrease of 32% from $89 million or $0.82 per diluted share. Excluding the aforementioned expenses, adjusted net income was $64 million or $0.60 per diluted share.
Adjusted EBITDA was $101 million, down 24% compared to $133 million.
As noted in today's earnings release, given our strong start to the year, we are maintaining our full year 2025 guidance. We expect to see strong year-over-year comparisons in the second half of the year driven by normalized production levels, the ongoing benefits of our continuous improvement initiatives, the absence of the channel inventory reductions that occurred in the second half of last year.
We continue to anticipate a flat Repair and Remodel market relative to 2024 and we expect to considerably outperform the R&R market in 2025, supported by continued strong demand for our premium decking products, increasing demand for our entry level decking products, and double-digit growth in our railing products.
To reiterate our 2025 guidance, we expect net sales growth to be between 5% to 7%, adjusted EBITDA margin to exceed 31%, SG&A expenses to be approximately 16% of net sales, interest expense less than $2 million, and depreciation in the range of $55 million to $58 million. We are projecting an effective tax rate of approximately 25% to 26%.