WASHINGTON — Medicare’s financial condition improved significantly in the last year, thanks in part to the Affordable Care Act, but the outlook for Social Security is basically unchanged, the Obama administration said Monday.

If Congress makes no change in existing law, officials said, Medicare’s hospital insurance trust fund will be exhausted in 2030, four years later than the administration projected in May 2013. The Social Security trust fund, they said, will be depleted in 2033, the same as expected last year.

The forecasts were included in the government’s annual report on the two programs, which together account for about 40 percent of federal spending.

Medicare spending on hospital care was lower than expected last year, the administration said, and officials have lowered their assumptions about the use of inpatient hospital services in the future.