Navy Secretary John F. Lehman Jr. said yesterday that he will cancel the $40 billion F18 fighter plane program unless the plane's two builders lower their price by November.

"The price must come down, or we're not going to buy it," Lehman said in an interview with The Washington Post. He added that Defense Secretary Caspar W. Weinberger and Deputy Defense Secretary Frank C. Carlucci support the tough stance.

Lehman acknowledged that he was going public with his threat to help persuade McDonnell Douglas Corp. and the Northrop Corp. that he is deadly serious about canceling the contract if current negotiations do not bring a lower price.

The F18 was supposed to be the low-cost replacement for the Navy's F14 fighter, made by Grumman Aerospace Corp., and the A7 attack plane manufactured by the Vought Corp. But it has not worked out that way.

The Navy secretary spread a cost sheet on the coffee table in his fourth-floor Pentagon office to underscore that point.

In fiscal 1981, he said, the Navy paid $24.1 million each for the F18, $26.1 million for the F14 and $16.4 million for the Grumman A6 attack plane. Those are what the Navy calls "flyaway" prices and do not include spare engines or research and development costs.

"The Navy is in a very comfortable and strong position," Lehman said of the F18 price negotiations, "because we have a very attractive alternative to the F18, which is lower cost."

The alternative would be to buy more F14s than originally planned to provide air defense for the fleet and to purchase A6 light bombers to support Marines and other troops ashore rather than buy the attack version of the F18.

Such a decision would trigger a congressional fight, with the Missouri and California delegations allied against the New Yorkers, among whom is Democrat Joseph P. Addabbo, chairman of the House Appropriations subcommittee on defense.

McDonnell Douglas is headquartered in St. Louis, Northrop is outside Los Angeles in Century City and Grumman is in Bethpage, L.I. McDonnell Douglas and Northrop are teamed on the F18 while Grumman builds the F14 and A6.

Lehman said the F14-A6 combination would save money unless the F18 price comes down in fiscal 1984, the budget the Pentagon is now putting together for submission to Congress early next year.

Until now, the Navy has said it would buy 1,366 fighter and attack versions of the F18 for an estimated $39.7 billion. Only about $5 billion of that total has been spent or obligated, so the big money is still up for grabs.

The Pentagon's decision on the F18 was expected in late October at a meeting of the Defense Systems Acquisition Review Council, but that meeting is not expected to take place until after the Nov. 2 elections.

Navy leaders consider the F14 a better dogfighter than the F18 and the A6 a better bomber. But the F18 is designed to do both jobs almost as well. Since it is easier for mechanics to maintain one type of plane rather than several, the F18 was supposed to make life simpler for aircraft carriers' mechanics.

If McDonnell Douglas and Northrop do not lower their price and Lehman makes good on his threat to cancel the program, the plane once destined for the decks of the Navy's giant carriers may be limited to duty with Marine squadrons and the two small carriers the service will keep at sea.

Lehman insists that the F18 should be priced at no more than $22.5 million for fiscal 1984. If the builders do not set that price and Lehman makes good on his threat to cancel the program as of the end of fiscal 1983, the contract would stop at 240 planes.

Under the alternative program, the Navy would put new engines in the F14 and F18 and count on the savings from volume production to bring the costs of the planes under their fiscal 1981 levels.

Cancellation would be a heavier blow for Northrop than for McDonnell Douglas, the primary contractor. Northrop has sunk millions in its F5G fighter but has yet to receive an order from the Pentagon or foreign nations.

The F5G has been designed expressly for export under the FX program initiated by President Carter and embraced by President Reagan. McDonnell Douglas, by contrast, has a backlog of orders for its F15 fighter.

Northrop ranked 26th among defense contractors in fiscal 1981, with sales of $623 million, while McDonnell Douglas ranked first with prime contracts worth $4.4 billion.

Republican Gov. Bill Clements of Texas, while serving as deputy defense secretary in 1973-77 under Presidents Nixon and Ford, warned Navy admirals that they might not get new carrier airplanes if they did not go along with the Pentagon decision to find a cheaper alternative to the F14.

In 1974, Congress directed the Navy to select a version of whatever light fighter the Air Force chose in its competition between the General Dynamics F16 and Northrop F17.

The F16 won, leading Vought to assume it would take the lead in building the Navy version of the plane since it had teamed with General Dynamics for this purpose. Vought formally protested when the Navy chose the F18 on May 2, 1975.

The F18 has been flying through rough political weather ever since. As its costs rose, critics complained that the Pentagon was determined to buy the fighter no matter what it cost.