The Washington Post Co. yesterday announced an agreement to buy shares of the company's class B common stock from the firm's profit sharing plan at $22.25 a share.

More than 1,000 employees participating in the plan are scheduled to decide next month how they want their interests in the fund invested. Currently the plan owns $951,880 shares of the Post Co. stock, representing about three-fourths of the marketable value of the plan and about 11 per cent of Post Co. class B shares outstanding.

At least three different funds are being designed for future profit sharing plan investments - one consisting primarily of Post Co. shares; one a diversified portfolio of marketable stocks, bonds and mortgages, but including no Post Co. shares; and one managed by an insurance company with a minimum rate of interest.

Participants may pick one of the investment strategies for their portion of profit sharing or may divide their interest among the various plans. The profit sharing plan, initiated in 1953, now is being phased out and replaced by various pension plans.

Because a number of employees affected by the previous profit sharing have indicated a desire to participate in a plan with a more certain return than one based on fluctuating stock market prices for Post Co. stock, the company said yesterday that the plan's trustee - American Security Bank - may have to sell a "significant portion" of Post Co. shares now owned by the plan.

Under the agreement announced yesterday, the Post Co. will buy all such shares that may have to be sold.

The agreement provides that if either the closing price on the day before the stock is to be sold or the average price during 10 trading days prior to the sale is higher than $22.25 a share, American Security will not sell the stock to the communications company unless the firm is authorized by its board of directors to pay the higher price.