The government could run out of cash to pay its bills in full and on time sometime between the end of October and the middle of November if lawmakers fail to increase its $16.7 trillion borrowing cap, Congressional Budget Office Director Doug Elmendorf said Tuesday.

Elmendorf told reporters that the Treasury Department’s assessment that it’ll run out of borrowing authority and have just $50 billion cash on hand in mid-October “sounds plausible.”

The government has never defaulted on its obligations, and Treasury Secretary Jacob Lew warned Tuesday that Congress needs to act to increase the debt limit by mid-October. He warned Republicans that President Barack Obama will never go along with their demand to derail implementation of the new health care law as part of a measure to fund the government or increase the debt limit.

“Efforts to either defund or delay the Affordable Care Act are unacceptable,” Lew told the Economic Club of Washington. “That is not a path towards something that can ultimately be signed into law.”

Elmendorf also said the CBO’s estimate in May that the government will run a $642 billion deficit this year is proving a little too optimistic. He said slightly weaker revenues than expected will likely push that figure higher, but that the final deficit tally for the 2013 budget year ending Sept. 30 will still register below $700 billion.

Elmendorf made his remarks as the agency released an updated study of the government’s long-term budget ills. It says that federal health care and retirement programs threaten to overwhelm the federal budget and harm the economy in coming decades unless Washington finds the political will to restrain their inexorable growth. The long-term pressures promise to quickly reverse recent improvements in the deficit.

Tuesday’s Congressional Budget Office report says that government spending on health care and Social Security would double relative to the size of the economy in 25 years and that spending on other programs — like defense, transportation and education — would decline to its smallest level by the same measure since the Great Depression.

The share of federal spending devoted to health care would rise from 4.6 percent of gross domestic product today to 8 percent in 2038; spending on Social Security would rise as well, as the number of people receiving benefits rises to more than 100 million in 25 years, compared with 57 million people taking benefits now.

The rise in costs for thebenefits programs has been apparent for many years, and budget hawks says it’s best to tackle their unsustainable growth immediately rather than be forced to make more draconian cuts later. But Washington — whether government is divided or controlled by one party — has been unable to agree on ways to curb the growth of these programs.

Democrats prefer a mix of tax increases and relatively small cuts in Medicare, Social Security and other spending. Republicans have proposed more dramatic long-term cuts to Medicare but are dead set against further taxes, especially after Obama won rate increases on upper-bracket earners in January.

“The unsustainable nature of the federal government’s current tax and spending policies presents lawmakers and the public with difficult choices,” CBO said. “To put the federal budget on a sustainable path for the long term, lawmakers would have to make significant changes to tax and spending policies.”

Rep. Paul Ryan, R-Wis., chairman of the House Budget Committee, said: “In the weeks ahead, I hope we work together to heed CBO’s warning. We must provide relief to the families we serve. We should start by delaying Obamacare and paying down the debt to help grow the economy.”