A House-Senate conference committee agreed yesterday on a formula for phasing out President Carter's proposed crude oil tax, resolving one of the key issues that has held up the controversial measure for the past several weeks.

In a late afternoon session, the panel voted to begin phasing out the tax over a three-year period as soon as it collects a cumulative $227.3 billion in tax revenues, or in January 1988, whichever comes later.

The committee also softened an amendment passed by the Senate that would have enabled Congress to bar President Carter from imposing import quotas on foreign oil. Instead, the panel agreed to allow Carter to act first, subject to congressional veto later.

The compromises were among several the panel agreed on yesterday in an effort to clear the way for more controversial decisions this morning on how much of the $227.3 billion in crude oil tax revenues to use for aid to the poor, an energy trust fund and general tax relief.

The conference has been snagged for the past several weeks largely because House members, who previously had considered only the tax and not these other elements in the package, were divided over what to do about them.

The effect of the compromise on the phase-out provision would be to keep the tax in effect longer if oil prices rise above $35 a barrel -- a formula that some would serve as an incentive to help keep prices as low as possible.

The House version of the bill would have ended the tax on newly discovered oil after 1990, but left the tax on other categories of oil in effect permanently. The Senate version would have phased out gradually the tax on all oil after it collected a cumulative $189 billion.

The conferees earlier had settled on a figure of $227.3 billion as the total amount of revenues the tax should raise during the period. Along with the other actions yesterday, the conferees also voted to:

Give oil-producing states more leeway to raise their state severance taxes by allowing oil companies to claim deductions for any state severance tax they pay up to a maximum of 15 percent.

Limit the amount of "windfall profit" subject to the tax to 90 percent of the net income a producer derives from each property. The House had voted to tax all the net income, while the Senate had agreed on the 90 percent figure.

Impose a special 30 percent tax rate -- down from the 50 to 70 percent rates that apply to other categories of oil -- on oil extracted from Indian-owned land held by the Alaskan Native Claims Settlement Corporation.