Benefits for Americans, chiefly Social Security, Medicare and Medicaid, dominate the federal spending that gets transferred to states through grants, contracts and other programs.

But among the 50 states and the District of Columbia, there are stark differences in how the billions spent on these and other initiatives are distributed, according to new data compiled by the Pew Charitable Trusts (which also funds Stateline). To view the analysis state by state, see Stateline’s data visualization.

A Stateline analysis of the data shows that some states that receive a relatively small share of federal spending in a given category rely on it heavily.

Vermont, for example, is just 45th among the states and the District of Columbia in grant spending received, at $1.88 billion. But that sum represents a fourth of the federal spending it receives overall. Kansas, meanwhile, gets roughly the same dollar amount in grants as Vermont. But that sum is just 8 percent of the state’s federal spending, because of the state’s heavy reliance on retirement benefits, which comprise more than 40 percent of its share of federal spending.

The variations are even more pronounced in states that receive extremely high levels of federal spending overall, because of their sheer size. California, for instance, receives more than $100 billion in retirement spending; the next-closest state is Florida, with nearly $77 billion. But even California’s huge sum represents just a third of its overall federal spending, where for Florida, it’s 40 percent. California is either the top or second-highest recipient of federal dollars in each of the five categories below.

Overall, the federal government spent more than $3 trillion in the states last year. The spending is spread across five broad categories:

Retirement benefits such as Social Security, veterans benefits and disability;

Nonretirement benefits such as Medicare, food stamps and unemployment insurance;

Grants that cover Medicaid, transportation, education, housing and other programs;

Contracts for purchases of goods and services, half of which involve the military; and

Salaries and wages, including civilian and military personnel.

Each state's mix of federal spending matters in how it advocates for its interests in Congress, a reality more critical during times of budget cuts or other disruptions in Washington — like concern over sequestration and the federal government shutdown last fall.

Some states get more federal dollars in certain categories thanks to simple demographics. Florida, for example, gets the second-highest dollar amount of retirement benefits, behind only California. Others owe their advantage to economic realities: The top five states in contracts, for example, are government- and defense-heavy Virginia, California, Texas, Maryland and the District.

As an example of the variation, the report points to Alaska and Louisiana, where federal spending was equivalent to 18 percent of each state’s gross domestic product last year. But in Louisiana, federal salaries and wages were equal to 1.4 percent of the state’s GDP; in Alaska, it was 4.4 percent. As a result, the report said, “Alaska’s economy would likely be more affected than Louisiana’s by federal salary and wage cuts.”

Different states emerge as most reliant on certain types of federal spending. For retirement benefits, Oregon, Arkansas and New Hampshire all receive more than 41 percent of their federal spending from that category. On the other end are Virginia, Alaska and the District, receiving a fourth or less of their federal spending in that category.

In nonretirement benefits, Florida, Illinois and New Jersey receive more than a third of their federal funding in that category. Again at the other end are Alaska, Virginia and the District, with 15 percent or less.

The grants category presents a mixed picture as well: Vermont, New York and Alaska receive more than a quarter of their federal spending in that category. Florida, Kansas and Virginia are the bottom three, receiving less than 10 percent of their federal dollars this way.

The rankings reverse, however, when it comes to the salaries and wages and contracts categories. Washington, D.C., for instance, gets more than 44 percent of its federal spending from pay to federal employees, followed by Hawaii at nearly a third and Alaska at one-fourth. Wisconsin, Michigan and Connecticut, meanwhile, get less than 5 percent of their federal spending in this category.

Virginia and the District each receive more than third of their federal spending in the form of contracts, followed by Maryland at 28 percent. For the bottom three states, Oregon, Arkansas and Delaware, the share coming from contracts is less than 4 percent.

Taken together, the data present an important state-by-state picture of how federal spending is divvied up among them, said Lindsay Koshgarian, research director at the National Priorities Project, which does its own analysis of federal spending by state. And, she added, the numbers offer insight into how each state benefits from federal spending.

“We all pay taxes and we all do a fair amount of griping about the taxes that we pay,” Koshgarian said. “But we do, in fact, get something for those taxes.”