Cost of sales (excluding depreciation, depletion and amortization) consists of production- and processing-related labor costs (including wages and salaries, benefits, and bonuses), mining and processing supplies (such as reagents), parts and labor for the maintenance of our mining fleet and processing facilities, other facilities-related costs (such as property taxes and utilities), packaging materials, and shipping and freight costs.
Cost of sales increased year over year by $6.4 million, or 22%, to $35.9 million for the six months ended June 30, 2021. The increase was driven by higher sales volume. The increase in production cost per REO MT from $1,362 for the six months ended June 30, 2020, to $1,507 for the six months ended June 30, 2021, reflects higher material and supplies costs, partially driven by a temporary reagent trial and COVID-19-impacted freight-in costs, as well as higher payroll costs primarily due to an increase in our employee headcount as we further invest in our Stage II optimization project. These cost increases offset production efficiencies.
Notwithstanding an increase in employee headcount as we progress toward completion of our Stage II optimization project, we believe our production cost per REO MT has stabilized in the short-term, with operating efficiencies largely offsetting raw material and logistics pressures. We anticipate additional efficiency opportunities as we increase REO production volumes in our milling and flotation circuit over time.
Write-down of inventories for the six months ended June 30, 2021, includes a non-cash write-down of a portion of our legacy low-grade stockpile inventory during the second quarter of 2021 after determining that the inventory contained a significant amount of alluvial material that did not meet the Company’s requirement for mill feed and, as a result, was deemed unusable.
Royalty expense to SNR for the six months ended June 30, 2020, related to our prior obligation to pay SNR for the right to extract rare earth ores contained in our mine and was based on 2.5% of product sales, subject to certain minimums. Following the Business Combination, we do not incur royalty expenses on a consolidated basis. See Note 17, “Related-Party Transactions,” to our unaudited Condensed Consolidated Financial Statements.
General and administrative expenses consist primarily of accounting, finance, executive, and administrative personnel costs, including stock-based compensation expense related to these personnel; professional services (including legal, regulatory, audit and others); certain engineering expenses; insurance, license and permit costs; facilities rent and other costs; office supplies; general facilities expenses; certain environmental, health, and safety expenses; gain or loss on sale or disposal of long-lived assets; and growth and development costs.
General and administrative expenses increased year over year by $18.3 million, or 205%, to $27.2 million for the six months ended June 30, 2021, reflecting $8.3 million in stock-based compensation expense primarily from grants of Stock Awards made during the fourth quarter of 2020 related to the Business Combination. Excluding this item, the increase was $10.0 million, or 112%, mainly due to increases in personnel, professional service, and insurance costs as well as legal fees, which were incurred to support our operations as a public company as well as our growth and development initiatives.
Depreciation, depletion and amortization consist of depreciation of property, plant and equipment related to our mining equipment and processing facilities, depletion of our mineral resources, and amortization of capitalized computer software (prior to the adoption of Accounting Standards Update No. 2018-15). Depreciation, depletion and amortization increased year over year by $10.2 million, or 383%, to $12.8 million for the six months ended June 30, 2021, reflecting the impact of additional equipment purchases, assets placed into service, and depletion of the mineral rights resulting from the SNR Mineral Rights Acquisition in November 2020.
Accretion of asset retirement and environmental obligations is based on the requirement to reclaim and remediate the land surrounding our mine and processing facilities upon the expiration of the mineral lease and on the estimated future cash flow requirement to monitor groundwater contamination, respectively. Accretion of asset retirement and environmental obligation remained relatively flat year over year.
S-45