Most needy persons getting government food stamps will receive a cost-of-living increase ranging from $2 to more than $8 a month beginning July 1, the Agriculture Department said yesterday.

Officials said the boost, which will vary with the size of the household, will be the first for food-stamp families in 18 months.

About 17.8 million persons - nearly 5.6 million households - received food stamps in February, the most recent USDA tabulation. Federal cost of the program is currently estimated at around $5.5 billion annually.

The monthly allocation for a person living alone will continue to be $50 worth of stamps.

Other household sizes and their new food-stamps allocations include: two-person $94 a month on July 1 and $82 now; four-person $170 and $166; three-person $134 and $130; and five-person $202 and $198; six-person $242 and $236; seven-person $268 and $262; and eight-person $306 and $262; and eight-person $306 and $298.

Under present law a family must put up cash to gets its allotment of stamps. The amount of cash depends on the family's income. The difference between the cash it has to put up and the value of its stamps is the family's subsidy from the program.