For the six months ended June 30, 2021, net investment income was $0.2 million, a decrease of $0.4 million, compared to $0.6 million for the six months ended June 30, 2020. The decrease was primarily driven by decrease in interest rates compared to the same period in the prior year. We mainly invested in corporate securities, residential mortgage-backed securities and other fixed maturities securities issued by U.S. government and agencies.
Loss and Loss Adjustment Expenses
For the three months ended June 30, 2021, loss and loss adjustment expenses were $21.4 million, an increase of $18.1 million, compared to $3.3 million for the three months ended June 30, 2020. The increase was due primarily to an increase in our loss and loss adjustment expense as a result of more risk retained on policies written, and due to two strong hailstorms in Texas, where we had a high concentration of total insured value.
For the six months ended June 30, 2021, loss and loss adjustment expenses were $38.7 million, an increase of $33.5 million, compared to $5.2 million for the six months ended June 30, 2020. The increase was due to more risk retained on policies written, abnormally high weather-related losses, including the Texas winter storm Uri in February 2021, and a higher concentration in areas impacted by the weather-related losses.
Insurance Related Expenses
For the three months ended June 30, 2021, insurance related expenses were $8.5 million, an increase $4.4 million, or 107%, compared to $4.1 million for the three months ended June 30, 2020. The increase was due primarily to a $0.9 million increase in underwriting costs, $0.8 million increase in employee-related costs, $0.6 million increase in amortization of deferred acquisition costs, and $0.5 million increase in amortization expense attributable to capitalized internal use software. These increases were to support the growth of our business.
For the six months ended June 30, 2021, insurance related expenses were $16.0 million, an increase $8.0 million, or 100%, compared to $8.0 million for the six months ended June 30, 2020. The increase was due primarily to a $1.8 million increase in amortization of deferred acquisition costs, $1.4 million increase in employee-related costs, $1.3 million increase in underwriting costs, and $1.0 million increase in amortization expense attributable to capitalized internal use software. These increases were to support the growth of our business.
Technology and Development Expenses
For the three months ended June 30, 2021, technology and development expense were $7.5 million, an increase of $3.8 million, or 103%, compared to $3.7 million for the three months ended June 30, 2020. The increase was due primarily to an increase in employee-related costs of $3.6 million, including an increase in stock-based compensation of $0.5 million, and partially offset by an increase in capitalized costs for the development of internal-use software of $1.0 million, driven by an increase in headcount to support our growth.
For the six months ended June 30, 2021, technology and development expense were $14.5 million, an increase of $7.2 million, or 99%, compared to $7.3 million for the six months ended June 30, 2020. The increase was due primarily to an increase in employee-related costs of $7.0 million, including an increase in stock-based compensation of $1.0 million, and partially offset by an increase in capitalized costs for the development of internal-use software of $1.9 million, driven by an increase in headcount to support our growth.
Sales and Marketing Expenses
For the three months ended June 30, 2021, sales and marketing expense was $22.2 million, an increase of $4.9 million, or 28%, compared to $17.3 million for the three months ended June 30, 2020. The increase was due primarily due to $3.4 million of employee-related expenses including $1.0 million of stock-based compensation, driven by an increase in headcount to support our growth, $6.3 million in advertising costs, and $0.7 million in consultant costs. These amounts are offset by a decrease in direct acquisition costs of $7.5 million, which have now been deferred and the related amortization included in insurance related expenses after the acquisition of Spinnaker in the third quarter of 2020.
19