The work confirms with hard data what most doctors and policymakers already know: Hospital deaths are more expensive and intrusive than deaths at home, in hospice care, or even in nursing homes.

"This intensity of services in the hospital shows a lot of suffering that is not probably in the end going to offer people more quality of life and may not offer them more quantity of life either," says Dr. Richard Parker, chief medical officer at Arcadia.

Arcadia analyzed all the Medicaid claims data for a private Medicaid insurance company in one Western state and detailed how many billable medical procedures each patient received and where. Patients in hospitals were billed for far more medical interventions in the last days of their lives than people who died in other settings. The company declined to name the state or company.

The study showed that 42 percent of patients died at home at a cost of about $4,760 for their last month of life, while 40 percent died in a hospital at a cost of $32,379. Dying in a nursing home was the second most expensive locale, inpatient hospice was third and an emergency room was fourth.

"In the end, everyone died. They all died," Parker tells Shots. "If we look at this retroactively, retrospectively — and we could go back and ask people — I bet most of them would say I'd rather be home with my family."

Parker says the cost of hospital deaths paid for by Medicare or private insurance are likely even higher because they pay doctors and hospitals more for their services.

Many studies have shown that people, when asked, say they'd prefer to die at home rather than in a hospital. However, those wishes aren't always realized if a person hasn't given clear instructions to a doctor or family member.

Parker says hospitals are designed to cure people who are ill rather than to allow people to die peacefully.

"The culture of American medicine today and for the last several decades is to keep treating patients regardless of the quality of life," he says. "A lot of physicians have been reluctant to admit that the patient's life is coming to an end."

The picture is more complicated than the data show, says Dr. Lachlan Forrow, a professor of medicine and medical ethics at Harvard University.

Many patients move from home to hospice to hospitals and back during the last 30 days of life. And some may end up in the hospital because their pain or symptoms weren't adequately controlled at home.

Still, he says, hospitals are just not good at caring for dying people.

"We do lots of very expensive things in hospitals to people in the last part of life who would rather be home, and we do those in part because in the hospital they get paid for," he says.

It's the only way to justify keeping in a hospital the people who need around the clock nursing care but can't get it at home.

"If we really tried to make sure people at home could have what they needed at home, we could take better care of them, with less medical system-caused suffering, at lower cost, sometimes much lower cost," he says.