Net income (loss). Our net income was $7.3 million for the three months ended September 27, 2024, as compared to a net income of $1.6 million for the three months ended September 29, 2023. The increase in net income was primarily attributable to the increase in income from operations combined with the decrease in total other expense, net and the lower effective tax rate.
Nine Months Ended September 27, 2024 Compared to Nine Months Ended September 29, 2023
Contract revenue. Consolidated contract revenue increased $67.3 million, or 19.0%, in the nine months ended September 27, 2024, compared to the nine months ended September 29, 2023, due to incremental revenues in both our Energy segment and our Engineering and Consulting segment.
Contract revenue in our Energy segment increased $60.3 million, or 20.6%, in the nine months ended September 27, 2024, compared to the nine months ended September 29, 2023, primarily as a result of higher construction management revenues and increased demand for energy and electrification services under utility programs.
Contract revenue in our Engineering and Consulting segment increased $7.0 million, or 11.3%, in the nine months ended September 27, 2024, compared to the nine months ended September 29, 2023, primarily due to increased demand for services provided to our clients.
Direct costs of contract revenue. Direct costs of consolidated contract revenue increased $44.8 million, or 19.6%, for the nine months ended September 27, 2024, compared to the nine months ended September 29, 2023, primarily as a result of the increase, and change of mix, in contract revenues as described above. As a percentage of contract revenue, direct salaries and wages decreased to 16.4% in the nine months ended September 27, 2024 from 17.9% in the nine months ended September 29, 2023, while subcontractor services and other direct costs increased to 48.5% in the nine months ended September 27, 2024 from 46.7% in the nine months ended September 29, 2023.
Direct costs of contract revenue in our Energy segment increased $42.9 million, or 21.5%, for the nine months ended September 27, 2024, compared to the nine months ended September 29, 2023. Direct costs of contract revenue for the Engineering and Consulting segment increased $1.9 million, or 6.5%, in the nine months ended September 27, 2024, compared to the nine months ended September 29, 2023.
Subcontractor services and other direct costs increased by $39.2 million, or 23.7%, in the nine months ended September 27, 2024, compared to the nine months ended September 29, 2023, primarily due to the increase in construction management revenues and utility program revenues, which utilize a higher percentage of material cost and installation subcontracting. Salaries and wages increased by $5.7 million, or 8.9%, in the nine months ended September 27, 2024, compared to the nine months ended September 29, 2023, primarily as a result of the increases in contract revenue as described above.
Gross Profit. Gross profit increased 17.9% to $147.8 million, or 35.1% gross margin, for the nine months ended September 27, 2024, compared to gross profit of $125.3 million, or 35.4% gross margin, for the nine months ended September 29, 2023. The decrease in our gross margin was primarily driven by changes in the mix of revenues as described above.
General and administrative expenses. G&A expenses increased $12.3 million, or 10.7%, in the nine months ended September 27, 2024, compared to the nine months ended September 29, 2023. G&A expenses consisted of an increase of $7.4 million in the Energy segment combined with an increase of $4.1 million in the Engineering and Consulting segment, and an increase of $0.8 million in unallocated corporate expenses.
Within G&A expenses, the increase of $9.8 million in salaries and wages, payroll taxes and employee benefits, combined with the increase of $2.7 million in other general and administrative expenses, and the increase of $1.3 million in stock-based compensation was partially offset by a decrease of $1.6 million in depreciation and amortization. The increase in salaries and wages, payroll taxes and employee benefits was primarily due to an increase in incentive compensation, consistent with the improvement in operating profit, and higher fringe benefit costs. The increase in other general and administrative expenses was primarily due to increased professional service fees and computer-related