Roughly 5 million Americans move from one state to another annually and some states are clearly making out better than others.

Florida and South Carolina enjoyed the top economic gains, while Connecticut, New York and New Jersey faced some of the biggest financial drains, according to a Bloomberg analysis of state-to-state moves based on data from the Internal Revenue Service and the U.S. Census Bureau.

Connecticut lost the equivalent of 1.6 percent of its annual adjusted gross income, as the people who moved out of the Constitution State had an average income of $122,000, which was 26 percent higher than those migrating in. Moreover, "leavers" outnumbered "stayers" by a five-to-four margin.

Bloomberg's analysis included all 50 states and the nation's capital to provide a fuller picture of aggregate income flows from migration. About 10 percent of the population moves annually, or about 35 million people, according to the Census Bureau. Most moves are within the same county.

Florida posted a net income influx of nearly 3 percent of the state's adjusted gross income in 2016. South Carolina, Idaho and Oregon were also among the largest gainers in the interstate shuffle.

"Florida's powerhouse economy continues to churn out new jobs, retiree migration to Florida is on the rise, and millennials are coming into their prime home-buying years," Brad O'Connor, chief economist for Florida Realtor, said in a report before the trade association's annual summit.

Bloomberg's tally also included analysis by absolute net gain and loss of income.

New York's annual net loss was the highest, with a net $8.4 billion leaving the state. Exiting incomes of $19.1 billion were replaced by people who brought in $10.7 billion less in income. Illinois and New Jersey were next with net outflows of $4.8 billion and $3.4 billion, respectively.

Those three states also had three of the four highest proportions of outbound versus inbound residents last year, according to the United Van Lines, the largest U.S. household goods mover.

Florida was the top financial magnet, reeling in $17.2 billion more than it lost, about seven times the amounts netted by each of the runner-ups Texas, Washington and South Carolina. The Sunshine State was the No. 1 recipient of the wealth exodus from 18 individual states -- with New York, Illinois and New Jersey combining to contribute about $8 billion to Florida's income base.

While long a haven for retirement, Florida's effort to lure Wall Street executives has gained traction thanks to a provision in the federal tax law passed by the Trump administration that hits residents of high-tax states by putting a lower cap on state and local tax deductions.

Florida is also one of seven states that collect no income tax. The others are Alaska, Nevada, South Dakota, Texas, Washington and Wyoming. While New Hampshire and Tennessee don't have a state income tax, they do collect taxes on dividends and income from investments.

Billionaire hedge fund manager David Tepper, once ranked as New Jersey's richest resident, moved his main address and the headquarters of Appaloosa Management to Florida a few years ago. Real estate mogul Barry Sternlicht told employees of Starwood Capital Group that the firm's headquarters will shift from Greenwich, Conn., to Miami Beach by 2021.

Having surpassed New York's population in 2014 to be the third largest in the nation, Florida continues to siphon off the wealthy.

The average gross incomes of people moving to Florida from 10 states and Washington, D.C. exceeded $100,000, with those from Connecticut averaging $253,000. That far outstripped those of Florida natives who migrated to the reciprocal states.

"Job growth, lower costs of living, state budgetary challenges and more temperate climates" are the driving factors behind migration, Michael Stoll, a professor at the University of California at Los Angeles, said in separate study by United Van Lines.

Business formation can benefit from positive migration, too. Many of the states with the biggest income inflows from migration also lead in new business creation including South Carolina, Florida and Tennessee.

- Methodology: Migration data analysis included AGI flows within all 50 states and Washington, D.C., but excluded moves to and from military bases and U.S. territories such as Puerto Rico and Guam. Year-to-year moves are based on address changes on individual tax returns, in 2016 vs. 2015. A state's total adjusted gross income, whenever mentioned, included income from all filers. Outflows by state are based on aggregate data of residents who left the state and inflows are of new residents who moved to the state. AGI data, sourced from the IRS, are as of 2016 and inter-state migration data are from the U.S. Census as of 2017.