Cost of Revenue and Gross Profit
Cost of revenue decreased by $33.7 million, or 5.5%, to $578.2 million for the six months ended June 30, 2021 compared to the six months ended June 30, 2020. This decrease was primarily attributable to lower sales volumes, which was partially offset by a higher average home acquisition price.
Gross profit margins improved to 12.7% for the six months ended June 30, 2021 compared to 6.5% for the six months ended June 30, 2020. Gross margin improvement was primarily due to attaining higher resale prices as a result of favorable housing market conditions across our markets in the six months ended June 30, 2021.
Sales, Marketing and Operating
Sales, marketing and operating expense increased by $13.7 million, or 31.9%, to $56.7 million for the six months ended June 30, 2021 compared to the six months ended June 30, 2020. The increase was primarily attributable to a $14.2 million increase in advertising expense as we increased our marketing efforts in the six months ended June 30, 2021 after a reduction in advertising cost in the second quarter of 2020, as we largely suspended marketing efforts in response to the COVID-19 pandemic, and higher employee compensation costs associated with increased employee headcount. This increase was partially offset by a decrease in commissions and property carry costs, attributable to lower sales volumes.
General and Administrative
General and administrative expense increased by $1.6 million, or 20.0%, to $9.9 million for the six months ended June 30, 2021 compared to the six months ended June 30, 2020. The increase was primarily attributable to higher employee compensation costs associated with increased employee headcount as a result of the current and expected future growth in the business.
Technology and Development
Technology and development expense increased by $1.1 million, or 27.9%, to $4.9 million for the six months ended June 30, 2021 compared to the six months ended June 30, 2020. The increase was primarily attributable to higher employee compensation costs associated with increased employee headcount as a result of the current and expected future growth in the business.
Interest Expense
Interest expense decreased by $2.9 million, or 41.1%, to $4.2 million for the six months ended June 30, 2021 compared to the six months ended June 30, 2020. The decrease was primarily attributable to a reduction in interest rate spreads associated with our senior secured credit facilities, which was partially offset by an increase in the average outstanding balance of our senior secured credit facilities due to an increase in real estate inventory funded by the facilities.
Other Income, Net
Other income, net during the six months ended June 30, 2021 principally represents a gain from the disposal of fixed assets. Other income, net during the six months ended June 30, 2020 principally represents income derived from home loans processed under our investment in OPHL.
Income Tax Expense
Our effective tax rate was 1.0% for the six months ended June 30, 2021 and 0% for the six months ended June 30, 2020. Our effective tax rate during the six months ended June 30, 2021 differed from the federal statutory rate of 21% primarily due to changes in the valuation allowance, stock compensation, and state taxes. We record a full valuation allowance on our DTAs, such that our income tax expense reflects only state taxes which are revenue or commerce based.