Cost of sales. Cost of sales decreased by $3.0 million, or 1.2%, to $254.1 million in the six months ended June 30, 2024, down from $257.2 million in the six months ended June 30, 2023. The decrease in cost of sales was mainly in line with the decrease in product revenue for the six months ended June 30, 2024. Cost of sales as a percentage of revenue decreased to 63.3% in the six months ended June 30, 2024 as compared to 68.7% in the six months ended June 30, 2023 as the change in revenue mix to service sales partially offset the lower margins experienced from product and project contracts with lower margins.
Cost of services sold increased by $11.0 million, or 7.4%, to $158.0 million in the six months ended June 30, 2024, up from $147.1 million in the six months ended June 30, 2023. The increase in cost of services sold was mainly in line with the increase in service revenue for the six months ended June 30, 2024. Cost of services sold as a percentage of service revenue decreased to 51.0% in the six months ended June 30, 2024 as compared to 53.2% in the six months ended June 30, 2023 mainly due to the change in revenue mix to service sales.
Cost of goods sold decreased by $14.0 million, or 12.7%, to $96.1 million in the six months ended June 30, 2024, down from $110.1 million in the six months ended June 30, 2023. The decrease in cost of goods sold was mainly in line with the decrease in product and related party revenue for the six months ended June 30, 2024. Cost of goods sold as a percentage of product and related party revenue decreased to 105.1% in the six months ended June 30, 2024 as compared to 112.7% in the six months ended June 30, 2023 due to the negative margins from product and project contracts with lower margins.
Selling, general and administrative expenses. For the six months ended June 30, 2024, selling, general and administrative expenses decreased by $1.5 million, or 1.9%, to $74.0 million from $75.4 million in the six months ended June 30, 2023. This decrease was primarily attributable to benefits of our IT system optimization.
Research and development expenses. Research and development expenses increased by $1.4 million, or 82.5%, to $3.1 million from $1.7 million in the six months ended June 30, 2023.
Depreciation and amortization. For the six months ended June 30, 2024, depreciation and amortization expense increased by $1.8 million, or 10.8%, to $18.8 million from $16.9 million in the six months ended June 30, 2023. This increase was primarily attributable to increased investment in our manufacturing capabilities.
Other operating expenses. For the six months ended June 30, 2024, other operating expenses decreased by $2.2 million, or 100.0%, to zero from $2.2 million in other operating expenses in the six months ended June 30, 2023. This decrease was attributable mainly to restructuring that occurred in the six months ended June 30, 2023 that did not repeat in 2024.
Other non-operating income (loss), net. For the six months ended June 30, 2024, non-operating income (loss), net was $1.0 million, a favorable change of $0.5 million, or 96.2%, as compared to $0.5 million in the six months ended June 30, 2023. This increase was attributable mainly to various immaterial miscellaneous income items in 2024 that were not recognized in 2023.
Foreign currency gain (loss), net. For the six months ended June 30, 2024, the change in foreign currency gain (loss) was unfavorable by $4.4 million, or 149.0%, to a loss of $1.4 million in the six months ended June 30, 2024 from a gain of $3.0 million in the six months ended June 30, 2023. This unfavorable variance was attributable mainly to unfavorable currency exchange rates as the U.S. dollar was unfavorable to other currencies in which we transact.
Interest expense, net. For the six months ended June 30, 2024, interest expense, net decreased by $0.8 million, or 4.6%, to $16.9 million from $17.8 million in the six months ended June 30, 2023. This decrease was attributable primarily to our bond refinancing in November 2023 in which we successfully placed a new $200 million senior secured bond at a reduced cost of capital.
Income tax expense. For the six months ended June 30, 2024, income tax expense increased by $3.7 million, or 75.0%, to an income tax expense of $8.7 million from an income tax expense of $5.0 million in the six months
101