The Carter administration wants to loan Egypt from $2.5 to $6 billion over the next six years to modernize its military forces in hopes of adding stability to the Middle East.

The Egyptians would use the loans to buy U.S. arms.

That large an arms sale to Egypt over an extended period would be a major U.S. commitment, putting Egypt in Israel's league in terms of U.S. military aid. It thus is likely to provide sharp debate in Congress, which must approve it.

The Iranian experience -- seeing a leader overthrown after having sold him billions of dollars in arms -- is expected to make some lawmakers wary of starting another flow of arms to that part of the world.

Other opposition is likely to come from friends of Israel, fearful the United States may be tilting the Mideast arms balance toward the Arab states through aid to Egypt and Saudi Arabia.

Administration officials insisted that the number and type of weapons have not yet been decided upon. Egyptian President Anwar Sadat has asked for hundreds of new planes, tanks and ships.

Sadat, according to the Pentagon, is likely to get F16 fighter bombers and M60 tanks from the United States. His request for destroyers is proving troublesome, however, because Sadat has rejected offers of used U.S. Navy destroyers. New ones, like the Spruance class, are too big and expensive for his needs, according to the Pentagon.

David E. McGiffert, director of the Pentagon's International Security Affairs office, stated the administration's case for military aid to Egypt at a closed meeting of the Senate Foreign Relations Committee last week. He made these points, sources said:

The United States is the only nation that can keep Egypt's war machine from deteriorating, partly becaus European nations are not willing to extend the credit terms Sadat needs.

Sadat's political leadership and Egypt's stategic location are so important to the West that the United States should do what it can to keep Sadat in power.

Egypt's military must be modernized to placate Sadat's military leaders and to combat threats from Libya, the Horn of Africa and Israel. Specifically, Sadat -- in addition to the 35 F4 fighter-bombers already supplied him by the United States -- needs planes capable of shooting down Libya's Mig 23 and Mig 25 fighters supplied by the Soviet Union. Though McGiffert did not get specific, the F16 is the leading candidate for that role, according to the Pentagon.

The admistration intends to modernize Egypt's force over a number of years but has no plan to enlarge them.In fact, said McGiffert, the twin demands of economy and efficiency dictate a smaller Egyptian force than the one currently on duty.

McGiffert and State Department officials went to Egypt in August to review the country's defense needs. Opinions within the Pentagon, State Department and White House office of Management and Budget vary on how much is enough for the Egyptian military.

The range of proposals is from $2.5 billion to $6 billion over six years, according to administration officials. This compares to $1.5 billion in U.S. arms to Egypt in fiscal 1979. One complication has been Saudi Arabia's unwillingness to continue serving as Egypt's banker for arms purchases.

Sadat isolated himself from much of the Arab world by signing the peace treaty with Israel. The United States has since entered into a special relationship with Egypt, to the distress of some Israeli officials, with stepped-up arms sales one result.