The average senior pays nearly $39,000 in out-of-pocket medical costs during their final five years of life, even when most of their expenses are covered by Medicare, according to a recent analysis.

Dementia is by far the most costly ailment of the aged, as discovered by researchers from the Mount Sinai School of Medicine during an examination of thousands of Medicare beneficiary records. Between 2002 and 2008, cognitively-impaired Americans paid more than twice as much in health care expenses than those suffering from other serious illnesses, including cancer.

Elders who occupied the top 25 percent of medical expenditures (many of them suffering from dementia) paid an average total of $101,791 in the five years preceding their death.

Browse Our Free Senior Care Guides

Nursing home care proved to be the big black hole swallowing the finances of seniors with Alzheimer's—consuming 56 percent of their care costs, on average.

These findings aren't likely to surprise caregivers and seniors struggling to cope with Alzheimer's and other forms of dementia. But, the report does highlight one of the trickiest questions facing Americans who are at or nearing retirement age: How will I be able to afford long-term care?