The turmoil in Iran will be costing the United States dearly long after the current crisis caused by the takover of the U.S. embassy in Tehran is resolved.

In all 1980, Americans likely will pay at least $50 billion more for pretroleum products than they would have had the shah remained in power.

Not all of that money will go into the pockets of foreign oil producers. Some will go to U.S. producers, refiners and retailers. But all of it will mean more inflation, just as it has during 1979.

Should President Carter lose his bid for reelection next year, said his chief inflation adviser, Alfred Kahn, last week, it probably will be because of his failure to get inflation under control. The principal cause of that failure this year has been Iran.

Since the heightened inflation can also be blamed for worsening the coming recession, some part of the rise in unemployment in coming months can be blamed, too, on events in Iran over the last year.

Not all of the increase in oil prices, however, can be blamed on Iran.

The average price of imported fuel actually fell by 0.1 percent in 1978. At the end of last year, world oil prices were lower than at any time since the beginning of 1974 in real terms -- that is, after adjustment for general inflation.

That loss of pruchasing power, coupled with a drop in the value of the dollar, made the Organization of Petroleum Exporting Countries anxious to push up prices. And late last year, confronted with increased demand for oil, they might have been able to boost prices for 1979 by their desired 14 percent even if Iran had not been a factor.

If buyers of oil around the world had not pushed the panic button, nothing else might have happened. But panic they did, as countries like West Germany sought to buy as much oil as tanks would hold. So did the Japanese.

Actually more oil was being produced, even without Iran, than in the year before when inventories, which had risen extremely high, were being drawn down, particularly in the United States.

Fear of shortage proved far stronger than any thought of glut, and prices took off.

The resulting scramble for supplies provoked -- or allowed -- an additional 45 percent hike last June and another 6 percent since. And that does not include oil being sold for sky-high spot market prices.

Today world oil production is probably running at least 1.5 million barrles a day above consumption, but the panic is still on. Consuming nations ar vying to stockpile that much or more each day, as a hedge against future interruptions in supply, from Iran or elsewhere.

Meanwhile, most of OPEC is taking full advantage of all this. Only Saudi Arabia is still selling any oil at the "official" OPEC price of $18 a barrel. Just as they did last spring, other producing countries are playing leapfrog with their prices for oil sold on a contract basis. And more sellers are demanding spot market prices, even for oil they earlier agreed to sell under contract.

Worst of all, there seems little likelihood that markets will calm down before the December meeting of OPEC in Caracas at which "official" prices will be reconsidered. Most observers believe that OPEC, citing the very spot prices its members are forcing upward, will decide to ratify a sizable portion of the rise by increasing the official price.

OPEC's linchpin, Saudi Arabia, will feed immense pressure to raise its price from $18 to at least $23.50 a barrel, the present OPEC ceiling. Algeria, Libya and Nigeria have already breached the ceiling with prices above $26. Iran, Indonesia and Ecuador are at the ceiling, while most of the other members are above $21.

If the Saudis give in, the entire structure of world oil prices would leap upward roughly 30 percent. In that case, next year's import bill would run more than $80 billion, nearly double 1978's $43 billion.

Unfortunately for President Carter and the nation, virtually nothing can be done to slow down the OPEC juggernaut, certainly not between now and the beginning of 1980.

In face, the impact of higher world prices will be magnified in the United States next year by the phased decontrol of domestic crude oil prices ordered by Carter last spring. Today, only about one-third of U.S. crude is free to move upward with world prices. Controls on the remainder will be lifted over 21 months beginning Jan. 1.

This year the administration's hopes for reducing inflation below 1978's 9 percent rate were scuttled by the energy price surge. And now administration officials, including Kahn, are no longer certain consumer price inflation will drop below the double-digit range in 1980.

Many other nations are in the same boat. Economics of all the major industrial countries are slowing down because of oil-induced inflation and government policies intended to contain surging prices through tighter money supplies. The Japanese, whose currency has plummeted more than 35 percent relative to the dollar in the last year, are being hit perhaps hardest by the big jumps in dollar-denominated oil prices.

And, of course, many developing nations simply can no longer afford to buy as much oil as before.

Chances are the combination of skyhigh oil prices and recessions or slow growth in consuming nations will produce such a drop in demand sometime next year that the spot market will go down.

Unless Iranian production ceases altogether sometime in 1980 all the world's storage tanks will be full. Already oil company executives say it is easy to "borrow" crude for a month from another company and increasingly hard to find places to "park" crude supplies unneeded at the moment.

There are signs that U.S. oil companies have so much heating oil on hand that they have had to slow down their processing of crude because they are short of storage space for refined products -- a development that could lead to trouble with gasoline supplies next year.

But fear of shortage still reigns. There seems to be no way to get the spot market to calm itself until all the tanks are filled.

This then is the longer-term legacy of the turmoil in Iran: inflation and recession in industrial nations, deprivation in developing countries, an extra burden for a president seeking reelection.