Data Lab is realigning with our sister websites to better serve you! Beginning Fall 2022, you can find new content on and Be sure to update your bookmarks.
An official website of the U.S. government
Data Lab Logo of an abstract American flag referencing a bar chart
Data Lab Logo of an abstract American flag referencing a bar chart

Federal Spending by Category and Agency

Spending by Source Categories and Agency in 2021


Sort by:

In this section, you can explore federal spending either by category or by agency. Curious to find out more? Dive deeper to see spending details by subcategory and other options.

What does the government buy?

Well, a lot. The government buys a variety of products and services used to serve the public — everything from military aircraft, construction and highway maintenance equipment, buildings, and livestock, to research, education, and training. These purchases are classified by Object Classes, a classification system that describes the types of goods and services purchased by the government.

Our partner site,, allows visitors to explore federal spending by the types of items and services purchased by the federal government. Go explore federal spending by Object Class or to learn how spending categories and subcategories break down, go explore federal spending by Budget Function.

What are mandatory, discretionary, and supplemental spending?

The difference between mandatory and discretionary spending relates to whether spending is dictated by prior law or voted on in the annual appropriations process. Programs like Social Security, Medicare, and various income security programs, are based on laws previously established that dictate the money budgeted for spending each year, which is why spending for those programs is referred to as mandatory.

Discretionary spending is money formally approved by the President and voted on by Congress during the appropriations process each year. Generally, a majority of the discretionary spending is budgeted towards national defense. The rest of discretionary spending is budgeted to other federal agency programs ranging from transportation, education, housing, social service programs, as well as science and environmental organizations.

An additional type of spending that impacts federal spending is supplemental appropriations, also referred to as supplemental spending. In 2020, the U.S. Congress passed four supplemental appropriations laws for the federal government to use in relief efforts, to aid the nation’s recovery from the coronavirus disease 2019 (COVID-19). You can take an in-depth look at those supplemental appropriation laws in the COVID-19 funding analysis.

What does the future of Social Security and Medicare look like?

Each year, the Social Security and Medicare Boards of Trustees publish their Annual Report on the financial status of Social Security and Medicare. The Boards’ projections indicate that spending will continue to increase. As the average age of Americans increases, more funding is needed to support entitlement programs like Social Security, Medicare, and retirement and disability services for both military and civil servants. In 2020, the cost of the Social Security and Medicare programs was $2.03 trillion.

The majority of Social Security and Medicare funding comes from tax revenue and interest on trust fund reserves. For 2020, income for these programs was $2.02 trillion. However, costs exceeded revenue starting in 2018 for Medicare Part A and are expected to exceed revenue beginning in 2021 for Social Security. This will require the federal government to begin drawing down trust fund balances in order to continue paying full benefits. While Medicare Parts B and D are largely funded by general revenues and beneficiary premiums, the Boards project that Medicare Part A trust fund will be depleted by 2026 and the Social Security trust fund will be depleted by 2034.

It is important to note that these projections do not include the possible impacts the COVID-19 pandemic may have on the Social Security and Medicare programs.

How has federal spending changed over time?

When you are done here, we encourage you to explore trends in government spending over the past five years.


The Economic Impact Payments (stimulus payments; $569.5B) issued in response to the COVID-19 pandemic and the Child Tax Credit Payments ($79.0B) are reported by the Internal Revenue Service (IRS) and as part of Other Income Security.

Data Sources and Methodology

This visualization was created using the Monthly Treasury Statement (MTS) as the data source for federal government spending of the United States. Some categories from the MTS have been renamed in order to be more easily understood.

The Social Security and Medicare Boards of Trustees publish their Annual Report each year for the prior Fiscal Year. For example, the 2021 Annual Report contains financial information for the 2020 Fiscal Year.

More Analyses