Grocery shopping today seems to require the economic knowledge of John Maynard Keynes. Supermarkets offer a confusing variety of "inflation fighters" from cents-off coupons to "no-frills" store brands and "warehouse" pricing. Even if shoppers can figure out the real value in all these promotions, they may still feel they need the resources of a J. Paul Getty to get through the checkout line.

The ideal grocery store would provide four things: qaulity food, reasonable prices, services that save you time and convenient hours. A recent shopping trip in three sea supermarkets illustrates that consumers can weigh these factors and still make some economic choices, especially on shelf-stable items.

One of the more interesting alternatives is Bag 'n Box, 8541 Piney Branch rd. in Takoma Park. A six-month-old limited assortment store where customers help themselves to nonperishables out of cartons stacked in rows, Bag 'n Box carries canned meats and fish, paper products, pasta, rice, cereals and a variety of drinks. In addition, there are staples, some convenience mixes, condiments and cleaning products, pet foods and even candy.

There is no decoration, limited selection and no service. You must pay in cash or food stamps, bring your own bags from home and package your purchases yourself after you check out. But if you are willing to do it yourself, you can carry home a variety of brand-name items for 20 to 25 percent less than you would pay for them at some area chains.

Bag 'n Box accepts manufacturers' coupons, and, despite a brisk business, checking out takes no longer here than at a full-service store. Bring more cash than you think you'll need; you'll probably buy more than you'd planned when you see the prices. But be forewarned: They are closed Mondays; hours are 10 a.m. to 6 p.m. Tuesday through Saturday (except Friday, 10 a.m. to 8 p.m.) and 10 a.m. to 2 p.m. Sunday.

Those who prefer one-stop shopping at lower prices would do well to investigate Pantry Pride's two-month-old policy of discount pricing. They offer meat and produce specials weekly, like the other chains, and offer deli items and fresh fish, as well as a full selection of products. In addition, they reduce prices on many name brands. Checkout took about the same length of time as at Bag 'n Box, but my groceries were bagged for me. Pantry Pride is open 7 days a week, 9 a.m. until 10 p.m., except Sunday, 9 a.m. to 6 p.m.

At Giant Food, 8750 Arliss St. in Silver Spring, you get the full treatment and you pay full price - if you buy name-brand products. Here there are attractive displays, wide selection, a deli and bakery, weekly cents-off coupons on milk and other designated items, and weekly specials on Giant-backed products. The trick here seems to be to buy Giant brand items, promoted in store ads as "Top quality . . . at reduced prices." Giant-brand foods, where available, are competitive with Bag 'n Box prices on name-brand products, and, of course, you can buy some brands on special sales and do as well. Brand-name peanut butter and paper towels, for instance, are two frequently features specials.

Checkout at Giant was slow, despite the presence of automated tally which "read" prices from the computerized labels that grocery-store items now carry. This Giant is open 24 hours a day except Saturdays, when it closes at 11 p.m.

The total grocery bill at Bag 'n Box was $28.03, at Pantry Pride $30.73, at Giant $36.74