Costs of operations for the six months ended June 30, 2021 increased 17.3% to $314,649 from $268,318 for the comparable period in 2020. Costs of operations increased as a percentage of sales to 89.6%, compared to 88.1% for the comparable period in 2020, which reflects increased fixed manufacturing overhead per unit of revenue and increases in the raw materials prices caused by escalating inflation.
Selling, general and administrative expenses for the six months ended June 30, 2021 increased to $23,070 from $21,041 for the comparable period in 2020 due to increases in software fees, personnel related costs, and a normalization in spending in comparison to the cutbacks from the second quarter of 2020. As a percentage of sales, selling, general and administrative expenses for the six months ended June 30, 2021 decreased to 6.6% from 6.9% in the comparable period in 2020, due primarily to increases in the revenue stream.
Interest expense, net decreased to $615 from $788 for the six months ended June 30, 2021 as compared to the prior year period. Decreases in interest expense, net were primarily due to decreases in floor plan interest payments and decreases in interest on the credit facility.
When the Company has transactions that are denominated in a currency other than its functional currency, the Company is exposed to foreign currency transaction risk and must record gains and losses through other (income) expense when the related balance sheet items are remeasured in the functional currency of the Company. Other (income) expense, net is composed primarily of these foreign currency exchange gains and losses, with the remainder being composed of gains and losses on disposals of equipment. For the six months ended June 30, 2021 the Company experienced a net foreign currency exchange loss of $229, compared to a net gain of $189 for the six months ended June 30, 2020.
The provision for income taxes for the six months ended June 30, 2021 and 2020 reflects a combined effective U.S. federal, state and foreign tax rate of 22.5% and 23.0%, 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.
Liquidity and Capital Resources
Cash provided by operating activities was $5,219 for the six months ended June 30, 2021, compared to cash provided by operating activities of $23,035 in the comparable period in 2020. 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 expenses that are necessary in the ordinary course of our operations, such as utilities and taxes. The change in cash provided by operating activities during the six months ended June 30, 2021 is primarily due to the increase in cash from operating activities during the second quarter of 2020, as the decrease in production from the impacts of the COVID-19 pandemic during the second quarter of 2020 caused less cash to be used during the six months ended June 30, 2020, while pre-pandemic receivables continued to be collected. However, during the six months ended June 30, 2021 production activities increased with customer demand, thus requiring more cash to be used in operations.
Cash used in investing activities was $5,414 for the six months ended June 30, 2021 compared to $7,503 for the comparable period in 2020. The cash used in investing activities for the six months ended June 30, 2021 was for purchases of property, plant and equipment.
Cash used in financing activities was $4,119 for the six months ended June 30, 2021, compared to cash used in financing activities of $4,300 for the comparable period in 2020. The cash used in financing activities for the six months ended June 30, 2021 resulted from the payment of cash dividends of $4,108 and an immaterial amount of payments on finance lease obligations. The cash provided by financing activities for the six months ended June 30, 2020 resulted primarily from the payment of cash dividends of $4,106, payments on our French subsidiary’s loan of $184, and an immaterial amount of payments on finance lease obligations.
As of June 30, 2021, we had cash and cash equivalents of $53,934. Our primary cash requirements include working capital, capital expenditures, the funding of any declared cash dividends and principal and interest payments on indebtedness. At June 30, 2021, the Company had commitments of approximately $5,012 for the acquisition of property, plant and equipment. At June 30, 2021, we also had a commitment of approximately $3,754 in software license fees. We expect our primary sources of cash to be cash flows from operations, cash and cash equivalents on hand at June 30, 2021 and borrowings under our credit facility as needed. We expect these sources to be sufficient to satisfy our cash needs during the remainder of 2021 and for the next several years. However, our ability to satisfy our cash needs will substantially depend upon several factors, including our future operating performance, taking into account the COVID-19 related economic and other factors discussed above and elsewhere in this Quarterly Report, as well as financial, business and other factors, many of which are beyond our control.
As of June 30, 2021 and December 31, 2020, $26,870 and $22,787, respectively, of the Company’s cash and temporary investments were held by foreign subsidiaries and their holdings are generally based in the local currency.