As online sales boom, there’s an inevitable side effect: More merchandise is getting returned, boosting costs and complexity for retailers.

The shift can be staggering.

“Shoppers return 5 to 10 percent of what they purchase in store but 15 to 40 percent of what they buy online,” David Sobie, co-founder and CEO of Happy Returns told CNBC.

Not being able to see an item in person accounts for part of the difference, but consumers also shop differently online than in-store, Sobie said. They may order multiple sizes or colors to try on at home, and then ship or take back what they don’t want, with shipping paid for by the retailer, both ways in some cases.

With costs mounting, understanding why shoppers return items and dealing with the logistics is a key issue that retailers are only beginning to tackle. A number of new businesses are sprouting up to try and wrangle the problem for retailers. These companies say higher rates of online shopping and more lax return policies are factors contributing to the rise of returns. However, there are more options for what to do with the returns, which can help to keep tons of unwanted items out of landfills and save retailers’ profit margins.

Average return rates vary by category, but clothing and shoes bought online typically have the highest rates with 30 to 40 percent returned.

Eric Moriarty, vice president of B-Stock Solutions, a liquidation marketplace said as e-commerce becomes a bigger percentage of retail sales, more returns will be coming back.

“In 2018, it will be somewhere in the area of $400 billion worth of inventory … with $90 [billion] to $95 billion returned post-holiday,” he said.

In the next several years, as e-commerce grows globally, “the amount of returns is going to be over a trillion dollars a year,” Tobin Moore, CEO and co-founder of reverse logistics technology company Optoro, said.

Another factor adding to rising returns is more relaxed return policies. As retailers fight for market share in an increasingly competitive industry, return policies are allowing longer windows to bring back items. Also, retailers are often accepting online returns in stores, even if the items were never sold at the store.

According to a Happy Returns survey, nearly three-quarters of Americans say returns are their least favorite part of shopping online, so an easy return system is crucial for retaining shoppers.

More items are returned during and after the holiday season than any other time of year. UPS estimates 1 million returns were made daily during December leading up to Christmas, largely from consumers that shopped early to take advantage of promotions and faster shipping options.

But once the returned goods are back in the hands of a retailer, less than half are resold at full-price, according to Gartner Research. That translates to retailers losing out on 10 percent of sales during the holiday season, a trend that has not improved over the last couple years, and is expected to get worse.

While returns are a big problem for retail, only about 30 percent of the country’s largest retailers quantify its full cost and only 23 percent use some kind of technology or software to better manage it, according to Optoro.

In aggregate, “retailers are losing billions and billions of dollars on the way returns are managed,” Moore said. “A lot of retailers can add 5 percent to their bottom line by better optimizing the management and resale of their returns.”

“Many retailers end up throwing away over 25 percent of their returns,” Moore said. “Holistically, that ends up being over 5 billion pounds of goods that end up in landfills a year from returns.”

He estimates over the next several years that could swell to 10 billion pounds of returns in landfills around the world.

For the 75 percent that doesn’t go to a landfill, the condition of the returned item, the timing of when it’s returned, and its location are all key factors in determining what comes next. Some merchandise is inspected and immediately restocked. Some has to be sent for refurbishing or repackaging. Other goods go to a liquidation channel where the items are repurchased by a reseller or consumer. There are occasional scenarios where returned goods are taken apart and components are recycled, or even “upcycled,” like turning shoes into a racetrack, Moore said.

Return scenarios have gotten more complicated. More relaxed return policies can mean shoppers return items after a season ends, making it hard to sell a winter coat in March, for example.

Plus, the internet offers retailers an “endless aisle.” That means many items are sold online only. If those purchases are returned to a store, the retailer will have a few choices: ship it back to a distribution or processing center; try to resell it as a one-off item in the store; liquidate, donate or recycle it or throw it away.

About 70 percent of high-end apparel can typically be restocked and resold, Moore said. If it’s a consumer electronics item or home and garden item that was sealed and isn’t anymore, or has any data on it, it has to be repackaged, refurbished and wiped of data. Only around 30 percent of those returned items can go back into stock immediately.

According to a spokesperson for Amazon.com, “once we receive a returned product we conduct a thorough inspection to determine if it can be sold to another customer as either ‘new’ or ‘used.’ If sellable as new, it goes back on the shelf. If we determine it can be sold as used, the team takes the necessary steps to ensure it is a quality product that customers will be happy with once purchased. We work hard to reduce the amount that goes to liquidation.”

Best Buy uses a number of methods to minimize the cost of returns, including selling open box items on its website and hosting a sales event for open box merchandise right after Christmas. The retailer also has a small number of Best Buy Outlets where open box and slightly damaged major appliances are sold.

B-Stock is another channel Best Buy uses to liquidate merchandise.

“Retailers are looking for new ways to make money and find margin,” B-Stock’s Moriarty said. “There are macro trends making returns increase over time, and there are better mouse traps out there today that make it less costly to handle a return.”

B-Stock builds individual online marketplaces for retailers or brands to sell returned, liquidated or excess merchandise in bulk quantities to certified resellers. Moriarty said the volume of inventory sold on its site grew 100 percent from 2017 to 2018. In addition to Best Buy, B-Stock clients include Walmart, Amazon, Macy’s, Lowe’s, GameStop, and J.C. Penney, among others. While B-Stock offers the option for warehouse storage of merchandise at CH Robinson warehouses throughout the country, B-Stock never takes financial ownership nor logistics control of the inventory being resold.

“Typically, our clients get a 30 to 80 percent price increase from how they used to do it,” Moriarty said, even in the online auction website format B-Stock sets up for the retailers. Retailers can restrict where a reseller can sell items. For example, they can require resellers to export the merchandise. Moriarty said much of the inventory is resold on Amazon, eBay or in other small local stores.

Optoro sells software platforms to retailers and brands that identify the best option for maximizing the value or lowering the cost of returned items on a case-by-case basis. Options could include restocking, refurbishing, liquidating, donating or recycling. Its clients include Target, Under Armour, Jet, BJ’s Wholesale Club, Staples, and Groupon. Optoro also has its own liquidation channels, Blinq.com, for liquidation resale to consumers, and Bulq.com, for liquidation resale to resellers.

“We can increase a retailer or brand’s return recovery amount, in many cases, by 25 percent. If it is items that are not going back in stock, we can double or triple the recovery in some cases,” Moore said.

Happy Returns offers technologies and logistics at nearly 300 U.S. locations to allow online purchases to be returned in person when the retailer doesn’t have a physical store. Direct-to-consumer brand start-ups like Everlane, Untuckit and Rothy’s work with Happy Returns, which has put its so-called return bars in malls, on college campuses and even stores like Sur La Table and Paper Source. Happy Returns packages it up for the shopper, sorts the returns by retailer, then ships in bulk to return hubs less expensively than the postal service offers.

“In aggregate, Happy Returns sees a cost savings upwards of 25 percent for our retailers,” said Happy Returns’ Sobie. He attributes this to the combination of hard cost savings of its network compared to shipping and the soft savings of lowering customer service inquires.

While there are technologies to reduce returns like 3D body scanning and other fit innovations, “it’s not working,” Sobie said.

Keeping shoppers happy is harder to quantify, but extremely valuable.

“Returns is a battleground for customers,” Moore said. “It’s a way to win more customers, to get them coming back and to get data so that you know how to better stock items and better make items for your customers as well.”