Medicare’s financial future is looking brighter despite a growing wave of baby boomers reaching retirement.

Getting relief from a slowdown in health care spending, the program’s giant hospital trust fund won’t be exhausted until 2030, the government said Monday. That’s four years later than last year’s estimate.

As for Social Security, its massive retirement program will remain solvent until 2034, although disability benefits are in more immediate danger. The disability trust fund now is projected to run dry in just two years. At that point, unless Congress acts, the program will collect only enough payroll taxes to pay 81 percent of benefits.

Trustees issued their annual report Monday on the financial health of the government’s two largest benefit programs, which together accounted for 41 percent of all federal spending last year. Though both are “fundamentally secure,” Treasury Secretary Jacob Lew said, “The reports also remind us of something we all understand: We must reform these programs if we want to keep them sound for future generations.”

Meanwhile, the trustees are projecting a 1.5 percent increase in monthly Social Security payments to beneficiaries next year. That would be among the lowest since automatic adjustments were adopted in the 1970s. The increase will be based on a government measure of inflation.

Medicare’s Part B monthly premium for outpatient care is expected to remain unchanged for 2015, at $104.90. Average premiums for prescription coverage are expected to increase by less than $2 a month.

Medicare’s hospitalization deductible is projected to rise to $1,248 in 2015, an increase of $32 from this year.

On balance, the report could help Democratic candidates in the midterm congressional elections. Republicans won the House in 2010 campaigning hard on a message that President Barack Obama’s health law would gut Medicare. But that’s not what has happened. White House spokesman Josh Earnest pointedly noted that Medicare’s hospital trust fund has gained 13 years of solvency since Obama took office.

Still, both Medicare and Social Security continue to face long-term financial problems. Benefit reductions, tax increases or a combination of both will be needed to avoid sharp cutbacks in the future.

In 2030, when the hospital trust fund is expected to be depleted, Medicare will collect enough payroll taxes to pay 85 percent of inpatient costs.

Medicare is adding 10,000 new beneficiaries a day as baby boomers reach age 65. But the report said that costs per beneficiary were essentially unchanged in 2013, for the second year in a row. That is a contrast with previous years, when both per-person costs and overall enrollment were growing.

Social Security’s disability program could be shored up in the short run by shifting tax revenue from the much larger retirement program, as Congress has done in the past. However, that would slightly worsen the retirement program’s long-term finances.

Lew endorsed such a move Monday.

If the two trust funds were combined, they would have enough money to last until 2033, the report said. That’s the same exhaustion date as in last year’s report.