Donald Trump and Hillary Clinton actually agree that health care costs are too high, but the two presidential candidates diverge on pretty much everything else when it comes to health.

When the issue finally came up at the second presidential debate on Sunday, Clinton advocated fixing the parts of the Affordable Care Act that don’t work. Trump called Obamacare a “total disaster” and repeated his call to repeal President Obama’s signature health legislation and replace it with something “that works.”

It’s unclear what that replacement would look like, but the Republican candidate called for changes such as making it easier for health insurers to sell across state lines. Clinton, a Democrat, was short on details on how she intends to fix the federal health law, but she clearly stands by it.

“It’s clear the parties have very different goals in health care,” said Larry Levitt, senior vice president at the Kaiser Family Foundation, a nonpartisan health policy research group headquartered in Menlo Park. “The Democrats are looking to expand the role of government and increase coverage while the Republicans are looking at lower spending and less regulation, with the result being fewer people with coverage.”

The federal health law, while far from perfect, has expanded coverage to an estimated 20 million Americans over the past three years. In California, where the enactment of the law has largely been hailed as a success, federal data show the percentage of working adults without coverage has dropped from 23.7 percent in 2013, before the major elements of the law went into place, to 11.1 percent in 2015.

But rising health insurance premiums for 2017, the turmoil created by major carriers dropping out of the new marketplaces and skyrocketing prescription drug costs have amped up election rhetoric about health care and the Affordable Care Act.

At the debate, Trump talked about controlling premiums by allowing health insurers to sell across state lines, a strategy that he said will lower costs by increasing competition.

But health policy experts say it’s unclear whether that will lower costs considering the practice is already legal, with companies like UnitedHealth and Anthem selling in multiple states. The insurers must be licensed in each state and show they contract with an adequate network of hospitals and doctors.

“The real barrier for health insurers expanding their presence in other states is building up a network of doctors and hospitals,” Levitt said.

Trump also promised to “block-grant Medicaid” as a way of saving money. This would convert the entitlement health program for the poor into block grants, or federal lump-sum payments made to the states.

While that could offer more flexibility, Stanford health economist Laurence Baker said block grants could make funding inconsistent. “There’s a real fear that could lead to less money and less care,” he said.

Clinton has advocated expanding Medicare, which covers the disabled and people over 65, as well as a public option to the private health insurance marketplaces created by the federal heath law.

But Baker said she will probably face an uphill battle unless the Democrats control both houses of Congress. “She has bolder ideas, but it’s not totally clear if she can achieve them,” he said.

Both candidates have additional details on their websites. Here’s how they stack up on other major health issues:

On rising prescription drug costs: Trump has criticized the skyrocketing cost of drugs, but hasn’t detailed how he would fix the problem. On his website, he says he supports allowing Medicare to negotiate directly for drug prices, a practice that is currently banned, and advocates letting American consumers buy “safe and dependable drugs” from overseas sources.

Clinton also supports allowing Medicare to negotiate drug prices and expanding access to drugs from abroad. But she has additional proposals, such as capping the amount individuals have to spend for their medications. (California already caps drug co-payments for Covered California plans and voters will determine whether state agencies will pay no more for drugs than the federal Veteran Affairs Department in a November ballot measure.) She also calls for creating a consumer group to protect patients from “outlier price increases,” pushing through the regulatory backlog of generic drugs and ending direct-to-consumer drug marketing.

On the troubled veterans’ health care system: Trump in July released a 10-point plan to improve health care provided through the Department of Veterans of Affairs, singling out mental health as an area in particular need for reform. He wants veterans to “get the care they need wherever and whenever they need it” and firing the “corrupt and incompetent VA executives that let our veterans down.”

Clinton has also been critical of the VA health system by calling for employees to be held accountable. She believes the system should be modernized but be protected from privatization attempts.

On the health of women, poor people and immigrants: While Trump once supported a woman’s right to have an abortion, he now opposes abortion but believes women should have access to birth control without a prescription. His plan for reducing the number of people on Medicaid includes installing “programs that grow the economy and bring capital and jobs back to America.” He wants to enforce immigration laws to alleviate the cost of providing health care for people residing in the country illegally.

Clinton wants all women to have access to preventive care, affordable contraception and safe and legal abortion. She wants states to expand Medicaid and make it easier to enroll in. She also supports expanding access to affordable health care to families regardless of immigration status, something that California is already taking steps to do.

Victoria Colliver is a San Francisco Chronicle staff writer. Email: vcolliver@sfchronicle.com Twitter: @vcolliver

The candidates on health: truth or fiction?

Statement: Donald Trump has pledged repeatedly to repeal Obamacare and replace it with “something great.”

Distortion: Repealing the Affordable Care Act is a tall order. First, the Republicans would need a majority of both houses of Congress. Even so, Senate Democrats could attempt a filibuster. Trump says he will replace the ACA with something better, but has been short on those details.

Statement: At Sunday’s debate, Trump accused Hillary Clinton of wanting to move to a Canadian-style single-payer plan.

Distortion: While Clinton has proposed allowing people aged 55 to 64 to join the federal Medicare program, she has not advocated for a single-payer system.

Statement: Hillary Clinton says Trump supports “an agenda out there” to privatize the Veterans Affairs health care system.

Distortion: While Trump’s plan for the VA system includes some elements of privatization, such as allowing veterans to choose doctors and hospitals outside the system, he has not called for the federal government to get out of the business of taking care of veterans.