More people are going to be working into their retirement years, according to a study released Tuesday by Hearts & Wallets, a source of investor data.

Income from working makes up 8 percent of all retirement income, according to the data set used by Hearts & Wallets that included 40,000 people. Within a few years, 10 percent of all retirement income will be generated from retirees working, according to the answers from those respondents who are not yet retired.

As might be expected, retirees with pensions are the least likely to keep working, Hearts & Wallets said. Half of those with pensions say they will stop working at a certain age, while 32 percent of those without pensions said the same, according to the study.

Other changes that are occurring in retirement income as the number of people with access to pensions declines include an increased reliance on investment assets. Nationally, dividends from stocks and mutual funds represent 4 percent of retirement income for all current retirees and taxable brokerage accounts represent 2 percent of income. Those numbers are expected to double for future retirees.

Currently, 4 percent of all retirement income comes from withdrawals from retirement accounts such as IRAs, 401(k)s, 403(b) and 457. Those not yet retired expect 16 percent of their income to come from their retirement accounts.

Only 1 percent of current retirement income comes from real estate and future retirees project it will be 3 percent. But for those few retirees who have real estate investments, 22 percent of their individual income comes from their real estate investment.

Social Security makes up about half of retirement income.

The study shows that a diverse income is ideal for retirement, Hearts & Wallets said.