The House Ways and Means Committee approved a revised version of President Carter's "windfall profits" tax bill yesterday. The compromise would toughen the tax bite on oil companies between now and 1985 in exchange for softer treatment later.

The revision, designed to assuage both liberals' demands for a tougher tax and conservatives' calls for more incentives for new exploration, woudl net $27.8 billion in the next five years - $6 billion more than Carter's proposal.

Approval came on a 20-to-16 vote, with mainstream Democrats arrayed against a coalition of Republicans and oil-state members of Congress. Almost all of the committee's liberals supported the revised bill.

The bill is designed to recapture a portion of the extra revenues the oil companies would gain from Carter's decision to phase out price controls on oil.The phase-out began June 1.

The measure now goes to the House Rules Committee, where Ways and Means leaders hope to win a procedural ruling that would prohibit floor amendments.Republicans are expected to try to send the plan back to committee.

The committee's action yesterday was welcomed by the Carter administration, which had proposed a relatively mild tax and later invited the panel to toughen it. Treasury lobbyists went along with most of the panel's changes.

However, although the measure seems likely to pass the House intact, it is expected to be diluted by the Senate Finance Committee. Most observers say they believe the final version to emerge from Congress will be closer to Carter's plan.

Yesterday's vote came after the committee rejected a spate of last minute efforts by oil-state legislators to weaken the measure and a series of attempts by liberals to stiffen it.

The panel also pared the measure's tax bite by $200 million a year, or $1 billion between now and 1984, by exempting profits from state-owned oil production facilities that are used to finance public education.

The committee earlier had voted to exempt only state-owned oil production facilities in Texas, whose constitution earmarks the monies for public schools. Yesterday, the panel exempted California, Louisiana, Oklahoma and Alaska.

The committee also approved, in principle, a Carter proposal to chanel the revenues from the windfall tax into a special energy trust fund. But it balked at requiring that the funds be used for energy research and to aid the poor.

Ways and Means Chairman Al Ullman (D-Ore.) said the panel plans to work out details of the trust funds proposal separately after the House passes the windfall tax portion of the package. A GOP bid to scuttle the fund failed, 20 to 16.

In April, Carter proposed a 50 percent excise tax on some of the extra revenues oil companies would reap from his price-decontrol plan, with the size of the tax bite varying according to how much prices in each category.

The tax would be levied on the difference between the current world wide price of crude oil and the pre-de control price: $6 a barrel for oil discovered before 1972, $13 for that discovered since 1972 and $16 for newly discovered oil.

The Ways and Means Committee, however, made these changes in Carter's plan:

It voted to stiffen the tax by raising the rate on already-discovered oil to 70 percent, from Carter's 50 percent, and by retaining the tax permanently at this stiff level rather than reducing it gradually after 1990.

It voted to ease the tax bite on newly discovered oil, by raising the base on which the tax is figured and limiting its rate to 50 percent until prices rise substantially above the current $17 a barrel.

It voted to tax a larger share of low-price oil from wells that began producing before 1972, and to postpone the phasing out of that tax until July 1984 instead of May 1983.

It voted to tax Alaskan oil that already has been discovered, a category that Carter had sought to exempt from the levy entirely. Newly discovered Alaskan oil would not be subject to the tax.

It voted to ease the tax burden on so-called "tertiary" oil which must be flushed from the ground with chemicals or heat rather than merely pumped. At the same time, it stiffened the bite on "marginal" low-yield wells.

Although the changes would bring in more revenues that Carter's proposal between now and 1985, it would yield far less in tax money than the president's plan in later years.

However, Energy Department experts said the committee's changes would spur more oil production in later years than Carter's original proposal, up to 160,000 barrels more by 1985.

The committee plans to begin work next week on a companion Carter proposal to tighten the ability of oil companies to use foreign tax credits to reduce their taxes here. Treasury Secretary W. Michael Blumenthal presented the plan formally yesterday.

Floor action on the windfall profits bill is expected next week, in time for final passage by the House before Congress begins its Fourth of July recess on June 29. Congressional leaders say they hope to send the bill to thepresident by the end of the summer.