Every Friday, in a small windowless room deep inside a rambling Landover office building, Joan Gillis flips through hundreds of freshly printed price labels and letters, organizing and stuffing them into oversized white envelopes destined for the 128 Giant supermarkets in the Washington area.

The next day, when manager Steve Robb arrives for work at the Giant store at Lee Highway and Spout Run in Arlington, the envelope from Landover is waiting for him. He checks the contents--a two-inch thick stack of papers containing price change orders and labels for the coming week. After making sure that everything has been included in the package, Robb sets aside the grocery labels for night captain Al Bader to post after the store closes Sunday night. Before Bader finishes--and it takes him about four hours to make all the label changes--the store's computerized registers receive electronic instructions from Landover headquarters programming them to ring up new prices that correspond to the new shelf labels.

By the time the store opens for business Monday morning, prices on an estimated 600 to 700 items have been changed. On this particular day, for example, medium-size eggs sold for $1.09 a dozen, up a dime from the previous day. But the seven-ounce packages of Mann's potato chips were down a dime, from $1.09 to 99 cents.

A few days later, the process will begin again. For Giant, Safeway, Grand Union and other major supermarkets, the wheels of the pricing machinery never really stop running. In the volatile world of food retailing, setting the right prices at the right time is a crucial factor in a store's success. And although practices and procedures vary from one company to another, the basic intent of the pricing system is the same--to mark merchandise high enough to make a profit but low enough to attract customers and maintain sales.

"It's like a teeter-totter--you got to balance the thing," said Maurice Rhinehart, a Safeway division manager who is one of the key people in the price decisions that affect grocery bills for the Washington area's 3 million residents.

To consumers confronted by ever-changing prices, the process can seem mystifying, and not a little suspicious. "How do we know when the price is right?" demands Charlotte Newton, a Virginia consumer advocate.

The fact is that you don't know--because, as supermarket officials readily acknowledge, price-setting is an art, not a science. There are no formulas that guarantee fair prices and fair profits.

Instead, there is almost constant tinkering by store operators reviewing sales figures to determine whether customers are buying more or less than expected, how much the cost of doing business has changed and whether prices should be moved up or down. The experiments are complicated by the number of items in the store--an average supermarket carries about 15,000 products--and by the uncertainty of what price adjustments will do to change customer buying patterns. If the price is too high, the item may not sell. If it is too low, the store may lose money.

The grocery price war fought between Safeway, Giant and other area stores last year offers a graphic example of the pricing dilemma.

Stores slashed prices on hundreds of items between April and August, resulting in a drop of almost 6 percent in food prices measured by the government's cost-of-living index. The price cuts were accompanied by dramatic increases in sales--Giant Food Inc., for instance, registered a 15 percent increase in sales. But when the quarterly financial statements were compiled, Giant reported a $2.4 million loss--its first loss in more than 10 years. Prices began climbing immediately and Giant ended the year in the black.

Advocates such as Charlotte Newton argue that there is not enough competition in the Washington market because it is controlled by two big chains--Giant, which rings up about 37 cents of every dollar spent on groceries here, and Safeway, which rings up about 28 percent.

Officials of Giant and Safeway deny such allegations.

They say that competition--which they define as the price charged at a competing store--is one of three main factors considered when they set the price for an items. The other two elements are:

Wholesale cost, which is what the store pays the supplier for the product. Included in the wholesale is the farmer's price for producing the item, the transportation to get the item from farm to market as well as marketing, manufacturing and packaging costs.

Store overhead, which covers the retailer's cost of doing business, such as electricity bills, employe wages, taxes, shopping baskets, checkout registers and advertising. The company overhead also includes an allowance for profit. Retailers generally aim for a profit return of 1 to 2 cents on each dollar of merchandise sold--a return that may sound small but actually can translate into millions of dollars in profits or losses.

Supermarket officials will not talk about specific price moves they have made within their own stores. But they agree that competition usually makes more difference than any other factor in setting a price.

"You could put a price on a product that reflects the wholesale and the markup for overhead , but if that price is higher than at a competing store, the customer would quickly see that you have a higher price--and you then lose the sale of that product and the sale of everything else that that customer would buy," said Donald J. Smith, vice president and division manager of Safeway stores for the Washington area.

That is one reason for the wide variation in the markup on merchandise in supermarkets. Another reason for variations--and they may range from a low of 5 percent to a high of 55 percent--is the speed of turnover.

The different markups are intended, however, to add up to a specific total for the whole store--the markup goal for the average supermarket is 20 percent, according to industry surveys. To achieve that goal, the store typically will set low prices on high turnover, price-sensitive products and high prices on other products.

Many area supermarkets, for example, are now selling ham for $2.79 a pound. That represents a 4.5 percent markup over the company's cost of $2.67 a pound. But the same supermarkets have marked up Vlassic pickles 54 percent. One bottle of the pickles sells for $1.65, compared with the store cost of $1.07.

The reason for the low markup on the ham is that it is a popular basic food that sells quickly, compared with the relatively slow sales of a specialty item such as pickles.

In other parts of the store the markup ranges from 10 to 20 percent for canned fruits and vegetables and from 30 to 40 percent on the more perishable fresh fruits and vegetables. Health and beauty aids and other variety items typically have markups of 50 percent or more.

But basics such as sugar and chicken, which are among the fastest-moving items in supermarkets, often are marked up less than 20 percent. There are about 300 to 500 supermarket items that are believed to be price-sensitive--in short, those items that consumers buy frequently and therefore remember the price of from one purchase to the next.

In some cases a company will sell an item for less than it paid in order to match or beat the competition. That happened during the '81 price war when milk prices at Giant, Safeway and other major supermarkets fell from $2.09 a gallon in April to $1.69 in June. Milk has since climbed back to $1.89 a gallon.

When a store does reduce the price of an item to match or beat the competition, it looks around for something else that can be marked up to offset the loss. And, using a bit of marketing psychology, the store may display the product with the higher markup next to the product with the lower markup. The purpose is to entice the shopper to buy a mix of products that will yield a profitable rate of return for the store.

That is one reason why mayonnaise, a low-margin item, is often on the same aisle as high-margin pickles.

To keep up with prices in competing stores, major chains conduct regular surveys of each other's stores. Safeway, for example, has special shopping teams that go into Giant stores every week to record its prices. Giant makes similar surveys of Safeway prices.

In addition to watching each other, the supermarket operators keep close tabs on wholesale costs that can trigger retail price increases or decreases. The cost of fruits and vegetables vary according to weather and season, and similar price adjustments occur in other parts of the store. When suppliers of cereals, soft drinks, convenience foods or other groceries raise their prices, the retailer typically passes the increase on to store customers in the form of higher prices.

Both Giant and Safeway raised prices for some vegetable oils last week after an increase in wholesale prices. The 48-ounce bottle Sunlite oil at Giant sold for $3.09, up 12 cents from the week before. The NuMade oil at Safeway sold for 93 cents, up 4 cents.

Sometimes supermarkets lower prices because of reduced supply costs. The reduction may represent a special supplier promotion--a deal, as it is often called. Campbell's chicken noodle soup, which sold week before last for 37 cents a can at Safeway stores, was only 34 cents a can last week because of a special deal with the supplier.

Setting prices for a company such as Giant is a major undertaking involving dozens of people. Giant's grocery department, for example, which is responsible for buying about 9,000 of the 15,000 items in the average supermarket, has several employes who work full time tracking the wholesale cost of cereals, canned goods, packaged goods and other grocery merchandise.

By contrast, the fresh seafood pricing is handled by one man--Al Bennof, a burly company veteran who oversees the buying and processing. Bennof usually can be found from 5:30 a.m. to 3 p.m. weekdays in the refrigerated seafood plant in the Giant warehouse complex in Landover. But on Sundays he works at home, sometimes at his kitchen table, where he writes out in longhand the seafood prices for the week. When he finishes, he telephones the numbers into the office so they can be entered into the computers and ultimately on to the stores.

Thirty-five years plus in the grocery business, says Bennof, enable him to make pricing decisions and to know just how far he can go on a price before it will have an adverse effect on sales. Some weeks, when wholesale costs shoot up because of a small catch by the fishermen, Bennof says he shaves the retail markup in order to keep the store price down to a level acceptable to customers.

It's a question, he says, of experience and intuition. "You know by the seat of your pants."