McCormick & Co. was hit with two stockholder lawsuits yesterday, both accusing the Baltimore spice and real estate company, its top executives and auditors of defrauding investors by overstating sales and profits for four years.

The two lawsuits, seeking unspecified damages on behalf of all McCormick stockholders, were filed in U.S. District Court in New York by lawyers representing shareholders Sol Goldman of Manhattan and Edward H. Taubman of Baltimore.

They closely parallel lawsuits that followed disclosure by McCormick last Friday that the company had used a series of irregular accounting practices, including fictitious records, to make its business look bigger and more profitable than it actually was.

The practices disclosed by McCormick amounted to fraud, the two lawsuits contend, because the false earnings and sales reports caused investors to pay what Taubman's attorney called "artificially inflated" prices for McCormick stock.

McCormick officials said they hadn't seen either of the lawsuits and could not reply to them.

Nor would a McCormick spokesman comment on the likely outcome of an investigation under way by the Securities and Exchange Commission into McCormick's accounting practices and possible violations of several SEC regulations.

Both lawsuits filed yesterday accused the company, several top executives and the accounting firm of Deloitte, Haskins & Sells of violating federal securities laws. The SEC reportedly is investigating the same allegations.

The lawsuits claim investors who bought McCormick shares between April 1977 and May 1982 are entitled to be reimbursed for the "inflated" price of the stock and also ought to be paid punitive damages for the misdeeds of the company, its officers and auditors.

Besides the company, both lawsuits name as defendants five McCormick executives: Hillsman V. Wilson, president; Donald W. Dick, vice president and treasurer; James J. Harrison Jr., the corporate secretary; Richard I. Pulse, controller; and David B. Michaels, head of McCormick's grocery products division.

Michaels resigned from McCormick's board last week after the company disclosed a series of steps used by the grocery products division to inflate its sales and profits. No action has been taken by the company against any other executives.

The lawsuits claim the McCormick executives violated their legal obligations as officers of the corporation and "employed devices and schemes to defraud" stockholders.

Deloitte, Haskins & Sells, the auditing firm that certified McCormick's financial reports, was named a defendant in both lawsuits. Taubman charged the accountants "didn't understand some of McCormick's accounting methods" and "failed to pursue improprieties."