Gulls fly overhead as a compactor manages the flow of garbage at a Colorado landfill. States are trying to reduce the amount of food that ends up in landfills. © Austin Humphreys/The Coloradoan via The Associated Press

Every day, American families throw out tons of spoiled food — or food they think is spoiled because they misunderstand “sell by” labels. Restaurants dispose of usable leftovers, and farmers toss imperfect produce.

In the United States, about 30 to 40 percent of all food is not eaten. About 95 percent of that wasted food, 38 million tons in 2014, ends up in landfills or incinerators, where it produces methane, a gas that is one of the most potent contributors to climate change.

To protect the environment, relieve hunger and save money, states are trying to reduce those numbers. California, Connecticut, Massachusetts, Rhode Island and Vermont already restrict the amount of food and other organic waste (such as soiled and compostable paper and yard waste) that can be dumped in landfills. Maryland, New Jersey and New York are considering similar laws.

States are offering tax breaks to farmers and small businesses that donate food rather than throw it away, limiting the liability of food donors, and standardizing “use by” labels so consumers don’t toss food that is still edible.

New Jersey is mulling an award to prompt people to come up with productive ideas for making use of “ugly produce,” foods that are perfectly edible but shunned by retailers, processors and restaurants because of blemishes and other flaws.

The issue also is attracting notice beyond state capitols. Some businesses are collecting farmers’ imperfect produce and restaurant food that is on the verge of spoiling or has passed its “sell by” date and selling it to customers at a discount. Others have created apps that connect restaurants and stores that have surplus food to people who want it.

The Food Waste Reduction Alliance, which represents the food industry and restaurant trade associations, recently worked with Harvard Law School’s Food Law and Policy Clinic to simplify and standardize “use by” and “sell by” labels, which befuddle many consumers. People toss a lot of edible food because they misunderstand the difference between the two terms.

“There has been an enormous amount of change over the past two or three years,” said Emily Broad Leib, director of the clinic.

Waste at All Levels

The U.S. spends about $218 billion annually to grow, manufacture, process, distribute and then dispose of food that is not eaten, according to a report released last year by ReFED, a coalition of 30 businesses, nonprofits and foundations that seeks to reduce food waste.

The report notes that food is wasted at all levels of the food system. Low market prices, high labor costs, and a market that demands perfect-looking produce prompt farmers to leave food unharvested in the field. Grocery stores and restaurants consistently over-order food. Households waste food because of inefficient shopping and cooking practices, and because they don’t have access to programs that collect waste for compost.

Even seemingly small details such as trays in school cafeterias and large plates in all-you-can-eat restaurants contribute to the problem by spurring people to take more food than they will eat.

Meanwhile, 1 in 7 Americans suffer from “food insecurity,” which the federal government defines as “limited or uncertain access to adequate food.”

Gradual Restrictions

The U.S. Environmental Protection Agency estimates that food waste is 21.6 percent of the garbage shipped to municipal landfills and incinerators, making it the largest single type.

In 2015, the EPA and U.S. Department of Agriculture set a national goal of cutting food waste in half by 2030. To achieve it, the EPA laid out a broad strategy, which includes producing less food, using excess food to feed people in need, feeding scraps to livestock, using organic waste to produce energy or compost, and disposing of food in landfills and incinerators only as a last resort.

Establishing restrictions on the amount of waste going to landfills is the toughest step to take: Only five states currently have such restrictions, and four of them target only the largest producers.

Three of the states also exempt waste producers that aren’t within a prescribed distance of a certified recycling or composting facility. Harvard’s food policy clinic warns that such loopholes create a disincentive for the construction of new facilities. In a 2016 report, the clinic noted that much of central and eastern Connecticut remains exempt from that state’s organic waste law, because there isn’t an approved facility in those areas.

Vermont, the least populous of the five, began phasing in its organic waste ban in 2014, applying it to businesses that produced more than 104 tons of organic waste a year. In 2020, when the law will apply to all Vermont businesses and residents, it will be illegal to send any organic waste to landfills.

California also phased in its law. As of this year, its ban applies to all businesses (except for some in rural areas) that generate at least 4 cubic feet of organic waste a week. The goal is to cut by half the amount going to landfills by 2020.

Since 2014, all Massachusetts businesses, arenas and institutions that generate 1 ton or more of organic waste each week have been barred from shipping that waste to landfills.

John Fischer, the director of the Massachusetts organic waste program, said all of the roughly 1,700 waste producers covered by the law are thought to be complying with it. Massachusetts now has more than 35 facilities for turning food scraps and waste into compost, livestock feed or electricity.

However, Fischer does not envision his state making the recycling of organic waste mandatory for smaller businesses or residences any time soon. And he cautioned that strict rules may not make sense for every state.

Such laws work well in the Northeast, he said, because those smaller states have little space for landfills and relatively high energy prices, which make the cost of turning garbage into electrical power more attractive than it might be elsewhere in the country.

The proposed New York law would apply only to companies and facilities that generate 2 tons or more of organic waste a week. It wouldn’t take effect until 2021, and would only apply to businesses with an appropriate waste facility within 50 miles.

The bill also includes $1 million for food banks to expand their refrigerated storage and transport capacity.

Meanwhile, New York lawmakers already have approved a food waste measure long sought by farmers and anti-hunger activists: a tax credit for farmers who donate unharvested food to food banks. The credit will reimburse farmers for a quarter of the wholesale cost of their contributions, up to $5,000 a year.

Potential Pitfalls

For decades, environmental groups have clashed with food processors, grocery chains and other retailers over plastic-bag bans and bottle-deposit laws. But they are natural allies in the food-waste fight.

“As the industries look at it, these efforts are a ‘win-win-win’ because they keep waste from going to landfills, relieve hunger and create business efficiencies,” said Meghan Stasz, who heads sustainability efforts at the Grocery Manufacturers Association.

Reducing food waste can provide an economic boost: An independent study done for Massachusetts two years after it implemented its law found that it created more than 900 new jobs and added $175 million in economic activity.

But David Biderman, who heads the Solid Waste Association of North America, cautioned that states shouldn’t rush into adopting broad organic waste restrictions without extensive planning and discussions with those who will be affected.

Biderman, whose group represents businesses that haul, process and dispose of solid waste, said many cities and states made that mistake when they began curbside recycling.

“Some local governments rushed into curbside recycling before they had adequate facilities and infrastructure set up to handle it,” Biderman said.