The defense contractors were confident, the ubiquitous consultants universally anxious, the realtors resurgent and the merchants hopeful.

Ronald Reagan's election ought to be good for most Washington businesses, local executives speculated yesterday, though many were reluctant to relish publicly the economic implications of the conservative landslide.

The stock market, however, loudly hailed the benefits to businesses likely to be stimulated by new patterns in governmant priorities.

There was a $3.75-a-share jump in the stock of Martin Marietta, the Bethesda company that is the prime contractor on the MX missile. Heavy trading added $1.375 to the value of a share of Fairchild Industries, the Germantown maker of the A-10 aircraft.

"The shift in congressional attitudes and at the White House can only look positive to us," said Fairchild President John Dealy. Fairchild's A-10 is one of the three prime weapons needed to boost the United States' ability to wage conventional warfare, he noted, and Fairchild board member Adm. Thomas Moorer is a top Reagan defense adviser.

But the predicted boom in defense-oriented business is likely to be offset by slim pickings for the vaguely-credentialed consultants who make their livings cranking out cosmic studies for agencies such as the Department of Health and Human Services, the Department of Education or the Energy Department.

"The military business is going to go up," said one consultant, "but what I call the 'scenario writers' -- the guys in the 'soft sciences' -- are going to have trouble."

He predicted makers of conventional military hardware will benefit more than the dozens of local "beltway bandits" who do research in esoteric weapons that are years away from the battlefield.

"The perception is that companies like ourselves are going to benefit from the Reagan election," agreed William Borten, president of Atlantic Research of Alexandria. A specialist in solid-fuel rockets, Atlantic Research supplies the boosters for the Cruise missle, the explosive devices that blast open the hidden lair of the MX missle, and weaponry for a new multiple-launch rocket system.

Regardless of where the Reagan administration spends the billions the candidate promised to add to the defense budget, the thousands of political appointees needed to staff the Republican government will have only one place to live -- and Washington real estate agents have plenty of houses to sell or rent.

Unlike Carter appointees, who came to town in the midst of a real estate boom and were shocked to find that Washington condominiums cost more than Georgia mansions, the Reaganites will arrive in a buyers' market.

The newcomers can't simply take over the quarters of the departing Democrats, however, because experience shows many federal appointees stay in Washington after their terms are up."Don't be surprised if a number of new law and consulting firms are formed in the next few months by displaced Carterites," predicted real estate man Duke Brannock.

The incoming appointees will face the same staggering 14-plus percent mortgage rates that have deterred other home buyers, but optimists in the business say that will drive home the lesson that some aid is needed for the housing industry.

The Reagan administration has "a mandate to attack the problems of inflation and over-regulation," said Merrill Butler, president of the National Association of Home Builders. The industry wants to aid first-time home buyers by writing a tax exemption for savings used to buy a home, just as contributions to retirement plans are now exempt from taxes.

Retailers too are hopeful that Reagan's economic program will slow inflation and stimulate consumers to spend again, said Leoard Kolodny, head of the retail bureau of the Board of Trade.

Election years are generally bad for Washington retail business, he explained, "but all the Democrats going and the Republicans coming ought to bring in some business."

(Washington Post Staff Writers John B. Willman and Merrill Brown also contributed to this story.)