Cash provided by operating activities declined from $449.9 million in 2021 to $297.8 million in 2022 and then increased to $316.4 million in 2023; as you note, our free cash flow declined from $348.1 million in 2021 to $168.3 million in 2022 and then increased to $197.3 million in 2023.
The primary driver of the declines in cash provided by operating activities and free cash flow in 2022 and 2023 relative to 2021 was a decrease in cash earnings. This reflected the impact of heavier investments that we made in certain areas of the business, including PitchBook, Morningstar Wealth, and Morningstar Sustainalytics as well as market headwinds that resulted in slowing revenues for Morningstar Credit, Morningstar Wealth, and Morningstar Retirement. For Morningstar Credit in particular, there is a high correlation between revenues and free cash flow, so lower revenue in 2022 and 2023 relative to a particularly strong year in 2021 had a meaningful impact on free cash flow. Higher interest expense was also a driver as we took on debt in 2022 to help fund the Leveraged Commentary & Data acquisition; the increase in interest expense was also driven by higher market interest rates relative to 2021.
In our quarterly supplemental reporting and in our earnings releases, we have provided free cash flow metrics excluding certain items, including severance payments and compensation related to M&A activity that was recorded in operating cash flow. Adjusting for those items, free cash flow was $210.7 million in 2022 and $288.1 million in 2023, an increase of 36.7%.
While we do not comment on future cash flow trends, we are confident in our operating model and our ability to generate strong cash flow over time. For the six months ended June 30, 2024, cash provided by operating activities increased 414.0% to $246.3 million from $47.9 million in the prior-year period and free cash flow for the six months ended June 30, 2024, was $180.3 million, up from negative $11.9 million for the prior-year period. Adjusting for certain items described above, cash provided by operating activities increased 101.2% and free cash flow increased 188.0%. (For more detail and a reconciliation of cash provided by operations to free cash flow, please see p. 30 of our Second-Quarter 2024 Supplemental Presentation available at shareholders.morningstar.com.) The increases reflect stronger operating performance, improvements in working capital, and higher conversion of adjusted operating income to cash flow.
Note: Free cash flow is a non-GAAP measure, which we define as cash provided by operating activities less capital expenditures. A reconciliation from cash provided by operating activities to free cash flow is included in our 10-Q and 10-K filings for the relevant periods.