A Congressional Budget Office analysis of ways to reduce the federal budget deficit says that a freeze of Social Security cost-of-living increases would fall heavily on the middle class and force 420,000 people into poverty, two-thirds of them elderly.

But an increase in federal income tax on Social Security benefits could raise almost as much money and shift almost the entire cost to people earning more than three times the poverty level, according to the CBO paper, sent to Capitol Hill last week.

The Senate Budget Committee, as part of a deficit-reduction package, has already voted to eliminate the 1986 cost-of-living increase for Social Security and several other government programs, but the proposal faces sharp opposition from Democrats.

The CBO, which listed options but made no recommendations, concluded that canceling the 1986 cost-of-living adjustment (COLA) boost for Social Security and Railroad Retirement recipients would cut federal outlays by $33.8 billion from fiscal 1986 to 1990 and push 280,000 elderly and 140,000 younger people into poverty.

This would reduce payments for 22 million families receiving those benefits by an average of $220 a year, the paper said.

In a separate study being circulated on Capitol Hill, the Social Security Administration said canceling cost-of-living increases would add 419,000 to the ranks of the poor, most of them elderly and two-fifths of them single women living alone.

According to the CBO report, 39 percent of the benefit reductions from canceling the Social Security and Raiload Retirement COLAs would be borne by families with incomes greater than 300 percent of the poverty line. But 54 percent would be borne by middle-class families between the poverty line and the 300 percent level, and the remainder by people under the poverty line.

The poverty line in 1984 for an elderly couple was $6,280.

The CBO paper laid out several alternatives:

* The 1983 Social Security amendments made up to half the Social Security benefit subject to federal income tax if the recipient's adjusted gross income is more than $25,000 ($32,000 for a married couple filing jointly).

If the cutoff were dropped to $20,000 ($25,000 for a couple) and 85 percent of benefits above that figure were made taxable, 99 percent of the cost would fall on people above 300 percent of the poverty line and $28.4 billion would be raised from 1986 to 1990.

* Counting half the insurance value of Medicare hospital benefits and three-quarters of the insurance value of Medicare doctor benefits as taxable income to the recipient would raise $20.1 billion over five years, and 77 percent would be paid by those above the triple-poverty line.

Half the value of hospital benefits would come to about $780, and three-quarters of the value of doctor benefits to about $510 at present, the CBO said.

* Repealing the extra income tax exemption for the aged would raise $13.3 billion and 81 percent of the cost would fall on those above the triple-poverty line.

* Imposing a 1 percent surtax on the taxable income of families enrolled in the Medicare doctor-insurance program would fall 92 percent on those above the triple-poverty line, but raise only $8.7 billion.