Six months ended June 30, 2021 compared to six months ended June 30, 2020:
Total revenue increased by $45.9 million, or 143% from $32.2 million in the six months ended June 30, 2020 to $78.1 million in the six months ended June 30, 2021. The increase in revenue in 2021 is driven by acquisitions and organic growth in our moving services, inspection and insurance businesses, which contributed an aggregate of $50.0 million of the revenue, offset by the revenue related to divestitures of $4.1 million.
Cost of Revenue
Three months ended June 30, 2021 compared to three months ended June 30, 2020:
Cost of revenue increased by $15.7 million, or 414% from $3.8 million in the three months ended June 30, 2020 to $19.5 million in the three months ended June 30, 2021. The increase in the cost of revenue was mostly attributable to the growth in the moving business and cost of revenue for our acquired businesses. As a percentage of revenue, cost of revenue represented 38% of revenue in the three months ended June 30, 2021 compared with 22% in the same period in 2020.
Six months ended June 30, 2021 compared to six months ended June 30, 2020:
Cost of revenue increased by $17.5 million, or 222% from $7.9 million in the six months ended June 30, 2020 to $25.4 million in the six months ended June 30, 2021. The increase in the cost of revenue was mostly attributable to the growth in the moving business and cost of revenue for our acquired businesses. As a percentage of revenue, cost of revenue represented 33% of revenue in the three months ended June 30, 2021 compared with 25% in the same period in 2020.
Selling and marketing
Three months ended June 30, 2021 compared to three months ended June 30, 2020:
Selling and marketing expenses increased by $14.3 million, or 163% from $8.8 million in the three months ended June 30, 2020 to $23.1 million in the three months ended June 30, 2021. The increase is due to $11.7 million related to higher selling and marketing costs associated with the growth in our moving, inspection and insurance businesses, as well as the selling and marketing costs of our acquired businesses. Additionally, there was an increase of $1.4 million in stock compensation charges. This is offset by our divested businesses selling and marketing costs of $0.7 million. As a percentage of revenue, selling and marketing expenses represented 45% of revenue in the three months ended June 30, 2021 compared with 51% in the same period in 2020.
Six months ended June 30, 2021 compared to six months ended June 30, 2020:
Selling and marketing expenses increased by $16.1 million, or 75% from $21.6 million in the six months ended June 30, 2020 to $37.8 million in the six months ended June 30, 2021. The increase is due to $14.2 million related to higher selling and marketing costs associated with the growth in our moving, inspection and insurance businesses, as well as the selling and marketing costs of our acquired businesses. Additionally, there was an increase of $3.7 million in stock compensation charges. This is offset by our divested businesses selling and marketing costs of $1.8 million. As a percentage of revenue, selling and marketing expenses represented 48% of revenue in the six months ended June 30, 2021 compared with 68% in the same period in 2020.
Product and technology
Three months ended June 30, 2021 compared to three months ended June 30, 2020:
Product and technology expenses increased by $6 million, or 118% from $5.1 million in the three months ended June 30, 2020 to $11.1 million in the three months ended June 30, 2021. The increase is due to investments in our moving, insurance and inspection groups, due to the growth in these businesses, product and technology costs from our