WASHINGTON — Senate leaders and their aides spent Saturday searching for a formula to extend tax cuts for most Americans that could win bipartisan support in the Senate and final approval in the fractious House by the new year, hoping to prevent large tax increases and budget cuts that could threaten the fragile economy.

As part of the last-minute negotiations, the lawmakers were haggling over unemployment benefits, cuts in Medicare payments to doctors, taxes on large inheritances and how to limit the impact of the alternative minimum tax, a parallel income tax system that is intended to ensure the rich pay a fair share but that is increasingly encroaching on the middle class.

President Obama said that if talks between the Senate leaders broke down, he wanted the Senate to schedule an up-or-down vote on a narrower measure that would extend only the middle-class tax breaks and unemployment benefits. The Senate majority leader, Harry Reid of Nevada, said he would schedule such a vote on Monday absent a deal.

If Congress is unable to act before the new year, Washington will effectively usher in a series of automatic tax increases and a program of drastic spending cuts that economists say could pitch the country back into recession.