According to a new Consumer Reports investigative study published Thursday, there is rampant variation in the price of generic drugs as large U.S. pharmacy chains — including CVS, Rite Aid, and Target — marking up the prices of generic drug versions for common medications by as much as 18 times what wholesale chains like Costco charge. That price variance ends up costing Americans, who spend an average of $758 out-of-pocket on drugs every year, hundreds of dollars in unnecessary spending each month.

Consumer Reports compiled the data by contacting hundred of pharmacies throughout the country and asking what their drug prices were for generic versions of Lipitor, Plavix, Actos, and other common medications. The results were striking, with pharmacy representatives claiming that the higher prices were necessary for covering overhead, and considering that selling medication constitutes most of their revenue and profit margins:

Costco was the least expensive overall, and you don’t need to be a member to use its pharmacy. A few independent pharmacies came in even cheaper, though their prices varied widely, as did grocery-store pharmacies. The online retailers Healthwarehouse.com and FamilyMeds.com also had very low prices. On the other end of the spectrum, CVS, Rite Aid, and Target had the highest retail prices. […] A representative of CVS told us that its retail drug prices reflect other services offered by the chain, including drive-through windows, automated prescription refill systems, free outreach programs to help make sure patients are taking their prescriptions correctly, and 24-hour pharmacies. Costco pharmacies, the cheapest overall, are open only from 10 a.m. to 7 or 8:30 p.m. and are typically closed on Sundays. “Big-box stores such as Costco and Walmart use the pharmacy as a traffic builder for their stores, whereas traditional chain stores, such as CVS, Rite Aid, and Walgreens, make the majority of their revenue and profits from the pharmacy,” says Stephen W. Schondelmeyer, Ph.D., Pharm.D., a professor of pharmacy economics at the University of Minnesota.

The study’s full findings are illustrated in this chart:

[[{“type”:”media”,”view_mode”:”full”,”fid”:”446813″,”attributes”:{“alt”:””,”class”:”media-image”,”height”:”361″,”typeof”:”foaf:Image”,”width”:”480″}}]]

The use of generic drugs — rather than their brand name counterparts — actually drives down spending on medications, consequently lowering Americans’ out-of-pocket costs and government spending on public insurance programs such as Medicare and Medicaid. But the Consumer Reports investigation suggests there are significantly more savings to be had.

This isn’t the first time generic drug makers have been in the news this week. On Monday, the Supreme Court took up Federal Trade Commission (FTC) v. Actavis — which one expert dubbed “the health care reform case of 2013″ — a case centering on the legality and antitrust implicationsof so-called “pay for delay” arrangements in which brand name drug makers pay off their generic drug counterparts to delay a drug’s generic version from entry into the market. If the FTC winds up winning that case, it could save Americans and the government billions of dollars on drug costs every year. But as this new report demonstrates, they could save much more if pharmacies stopped jacking up their rates to startling degrees.