NEW YORK — Shoppers can skip the math. It’s about to get easier to compare prices on products — from breakfast cereals to toothpaste — at some of the nation’s major online retailers.
New York’s attorney general said Tuesday that Costco, CVS, FreshDirect, Walmart, and Walgreen have agreed to list unit prices on their websites and mobile apps for shoppers nationwide in the coming months.
Amazon.com Inc., the world’s largest online retailer, did not agree to participate, Attorney General Eric T. Schneiderman said.
A unit price tells consumers how much a product costs by each unit of weight. It divides the full price of the item by the size of its packaging. For example, a 16-ounce bottle of shampoo costing $5.99 would have a unit price of 37 cents per ounce.
Because the same product can be sold in several sizes, a unit price is a better way to compare whether a giant bottle of shampoo is really a good deal, compared to a smaller one.
Retailers already list unit prices in stores, but they’re harder to find online.
The New York attorney general’s office said that 19 states and the District of Columbia have some type of unit pricing requirement. [Massachusetts is included.] New York law requires that large retail stores clearly display the price per unit of measurement for most types of food, cleaning and paper products, toiletries, pet food and over-the-counter medications. But prior to this initiative, unit pricing information online was rare. Among large retailers, full availability of unit pricing was limited to the online grocer Peapod.
‘‘As the Internet becomes the shopping mall of the 21st century, we need to ensure that consumers have the same robust protections online that they do in brick-and-mortar stores,’’ Schneiderman said.
Costco Wholesale Corp. and Wal-Mart Inc. will add them online before the end of this year. Wal-Mart said it already offers unit prices on some of the pet food it sells at Walmart.com and for the online grocery delivery service it’s testing in San Francisco and Denver.
‘‘Wal-Mart is pleased it could work with the New York attorney general to bring all consumers— in New York and across the US — greater transparency as they shop online,’’ said Ravi Jariwala, a spokesman.
CVS Caremark Corp., FreshDirect, and Walgreen Co., including its Drugstore.com subsidiary, will provide unit prices by March.
All of the companies also agreed to add unit pricing for any future online stores they may open.
Although Amazon lists unit prices for some items, it doesn’t do so consistently, the attorney general’s office said in a statement.
The company promised to list unit prices for its subsidiary 6, which runs Diapers.com, Soap.com, and other shopping sites, but did not commit to it in writing, the attorney general’s office said.
Amazon did not immediately respond to a request for comment. Quidsi declined to comment.