costs of operations decreased as a percentage of sales to 88.7%, compared to 89.2% for the comparable period in 2021, primarily due to the recognition of price increases on sales to customers.
Selling, general and administrative expenses for the three months ended September 30, 2022 increased to $14,673 from $11,983 for the comparable period in 2021 due to increased personnel related costs and certain other non-recurring charges. As a percentage of sales, selling, general and administrative expenses for the three months ended September 30, 2022 decreased to 7.1% from 7.3% in the comparable period in 2021, as a result of the increase in revenue.
Interest expense, net increased to $1,042 from $286 for the three months ended September 30, 2022 as compared to the prior year period. Increases in interest expense, net were primarily due to increased borrowings on our credit facility and increases in floor plan interest payments.
For the three months ended September 30, 2022 the Company recognized a net foreign currency exchange loss of $633, compared to a net loss of $198 for the three months ended September 30, 2021, reflecting foreign currency gains and loss on transactions denominated in a currency other than the local entity’s functional currency.
The provision for income taxes for the three months ended September 30, 2022 and 2021 reflects a combined effective U.S. federal, state and foreign tax rate of 23.0% and 28.2%, respectively. The principal differences between the federal statutory tax rate and the effective tax rate consist primarily of state taxes, domestic tax credits, and tax differences on foreign earnings.
Results of Operations – Nine Months Ended September 30, 2022 Compared to Nine Months Ended September 30, 2021
Net sales for the nine months ended September 30, 2022 increased 20.7% to $622,602 from $515,785 for the comparable period in 2021. The increase in revenue reflects the general economic recovery, supply chain improvement in certain of our product classes, and realization of price increases during the third quarter of 2022. Net domestic sales increased during the nine months ended September 30, 2022 to $562,235 from $450,908 for the comparable period in 2021, while net foreign sales decreased to $60,367 from $64,877 during the same nine-month period.
Costs of operations for the nine months ended September 30, 2022 increased 22.6% to $565,708 from $461,532 for the comparable period in 2021, primarily due to higher prices for components, parts scarcity resulting from supply chain challenges, and wage inflation. Costs of operations increased as a percentage of sales to 90.9%, compared to 89.5% for the comparable period in 2021, primarily due to the time lag in recognizing price increases through the backlog.
Selling, general and administrative expenses for the nine months ended September 30, 2022 increased to $39,710 from $35,053 for the comparable period in 2021 due to increased software licensing and personnel related costs. As a percentage of sales, selling, general and administrative expenses for the nine months ended September 30, 2022 decreased to 6.4% from 6.8% in the comparable period in 2021.
Interest expense, net increased to $2,088 from $901 for the nine months ended September 30, 2022 as compared to the prior year period. Increases in interest expense, net were primarily due to increases in floor plan interest payments and increased borrowings on our credit facility.
For the nine months ended September 30, 2022 the Company experienced a net foreign currency exchange loss of $1,097, compared to a net loss of $427 for the nine months ended September 30, 2021, reflecting foreign currency gains and losses on transactions denominated in a currency other than the local entity’s functional currency.
The provision for income taxes for the nine months ended September 30, 2022 and 2021 reflects a combined effective U.S. federal, state and foreign tax rate of 21.6% and 24.2%, respectively. The principal differences between the federal statutory tax rate and the effective tax rate consist primarily of state taxes, domestic tax credits, and tax differences on foreign earnings. Favorable tax adjustments in foreign jurisdictions drove the decrease in the effective tax rate for the nine months ended September 30, 2022.
Liquidity and Capital Resources
Cash used in operating activities was $31,602 for the nine months ended September 30, 2022, compared to cash provided by operating activities of $7,036 in the comparable period in 2021. Cash provided by or used in operating activities is generally attributable to the receipt of payments from our customers as settlement of their contractual obligation once we have fulfilled all performance obligations related to our contracts with them. These cash receipts are netted with payments for purchases of inventory, materials used in manufacturing, and other