The Pentagon has a loss-leader problem that your neighborhood grocer might recognize. A multibillion-dollar airplane sale to Spain may hinge on it.

If the Pentagon does not offer Navy F18 fighter-bombers to Spain at a bargain price, Spain may buy its next planes from some other country; specifically, it may buy French Mirage 2000s.

But if the Pentagon goes the loss-leader route with the F18 today in hopes of selling the plane to other European countries tomorrow, the U.S. Navy--and the American taxpayers--will be paying more for the F18 than foreign buyers.

All this has made for a tempest inside the Pentagon.

One thing that has leaked out about the fight, despite Deputy Defense Secretary Frank C. Carlucci's recent attempts to scare his bureaucracy into silence by giving officials lie detector tests, is a letter of complaint to him from Navy Secretary John F. Lehman Jr.

Rather than continue to sell the F18 as a loss-leader, Lehman wrote Carlucci, "authority is requested" to charge Spain and all other foreign customers their full share of the overhead in developing and producing the plane--$1,454,715 instead of the $877,690 per plane being charged now. This would of course raise the final sticker price, which would be good news for General Dynamics, which is trying to sell Spain its F16 fighter, and for France and its Mirage 2000.

A Pentagon spokesman said yesterday that Carlucci has not disclosed what action, if any, he has taken on Lehman's request.

Spain has been talking about buying from 40 to 120 new fighters, while Australia has announced it will definitely buy 75 F18s, which can serve as both fighters and troop-supporting bombers, depending on how they are armed. Australia is already slated to get its planes at the loss-leader price.

But there is another side to all this: some specialists say it will save the Navy money if it pays more than Spain per plane.

McDonnell Douglas and Northrop are building the F18 together. Unless the unit price of F18s is driven down through foreign sales, the Navy may not be able to afford anywhere near the number of planes it had envisioned, losing savings from hoped-for high volume production.

The F18 was supposed to be a cheaper alternative to the Grumman F14 fighter, but its price keeps climbing, with $30 million per plane a definite possibility the way things are going.

Lehman's letter documents that he, as secretary of the Navy, believes the Pentagon's old forecasts for the F18 were too sunny.

"The nonrecurring cost was projected to be $1,998,500,000 and the anticipated production run was 2,277 aircraft, 1,377 for the U.S. Navy and 900 for foreign sale," Lehman wrote Carlucci in a letter obtained by The Washington Post. "The unit recoupment charge of $877,690 was applied, and reduced, in the case of the purchase of the F18 aircraft by Canada and has been used in current discussions with Australia.

"Significant changes to the original assumptions have occurred," Lehman continued. "The nonrecurring cost is now expected to be $2,730,400,000. Furthermore, all the foreign sales do not appear likely to materialize. Rather the sales are not likely to exceed 500 aircraft. Thus, the unit recoupment charge should be approximately $1,454,715 on the basis of this current information."