Target is ditching its pharmacy business because selling prescription drugs didn't draw enough customers or yield enough profit, although it did generate $4 billion in sales.

Those sales represent a lot of people — Target won't specify how many — who'll have to decide if they'll continue getting their meds inside a Target store or go elsewhere.

The Minneapolis retail giant is expected to complete the sale of its pharmacy business by year's end, assuming regulators approve. Drug store chain CVS would then take over the pharmacies in some 1,700 Target stores.

Target has historically been more focused than CVS on lower prices. Target, for instance, has price-matched Walmart's prescription prices, sometimes with, sometimes without requests from shoppers. But once CVS is running the pharmacies inside Target stores, Retail consultant Howard Davidowitz predicts shoppers will pay more because CVS doesn't make Target's "Pay Less" promise.

"The prices can't be the same and they won't be the same," he said. "Price is central to the entire Target rationale. They're a discounter."

Investors have generally cheered the sale of the pharmacy business to CVS. Davidowitz, however, is a skeptic and believes it will be a major problem.

"I don't think Target looked at this correctly," he said. "Target has positioned itself to where it was clear to the customer that they were real alternative to Walmart and their prices were very, very close to Walmart's."

CVS promises to provide low-cost generic drugs to Target shoppers. But the company hasn't said whether it will offer the same list of drugs at the same prices as Target.

One change, however, is clear. Shoppers will have to pay cash for those medications, unlike now.

A CVS spokesman said the two companies share a goal that the ownership change will not have any "material impact" on Target customers buying widely prescribed generic drugs. CVS will also offer its own rewards program to replace Target's popular RedCard pharmacy reward program. Under that system customers could earn discount cards good for 5 percent off a day's shopping with Target.

Unlike Davidowitz, consultant Adam Fein doubts Target shoppers will have to shell out more when buying from CVS. Fein advises drug manufacturers on distribution but says he's never had CVS or Target as a client.

"I don't think it's going to have a huge impact on consumers' out-of-pocket expenses," he said. "Consumers who have insurance probably won't see very much of a difference."

His advice for people who don't have coverage? "Shop around. For many years, the pharmacy industry has had what I call a 'soak-the-poor' strategy where the uninsured will pay the absolute highest prices for drugs."

But even for Target customers who have a health plan, experts say the transition to CVS represents a good time to review their coverage and shop around since there's a lot of variation in how health plans handle medication costs.

A pharmacy's retail price can provide a better deal than the health plan does, said Stephen Schondelmeyer, a professor of pharmaceutical economics at the University of Minnesota.

"Sometimes if the actual net cost that the pharmacy would have charged is less than your co-pay, it may be better for you to pay cash to the pharmacy," he said.

Generics account for the great majority of prescriptions filled, and, for the most part, their costs have stayed down. But some have soared in price.

Pervasive price spikes have hit a wide array of medications, including some that are very widely used, said John Alpern, an infectious disease fellow at the University of Minnesota. A drug used to treat recent immigrants for parasites, he noted, went from $6 per daily dose to about $100.

The price hikes have been blamed on industry consolidation, ingredient shortages, slow regulatory approvals and greed.

"What's concerning to providers is what happens when prices go up," said Alpern. "Are patients not taking their medications? Are they looking for medications elsewhere?"

There are online tools that help consumers sort out prescription drug pricing, among them, GoodRx. The company says it has no sponsorship or affiliation with the pharmacies included in its price comparisons.

"Even insured Americans have to become avid consumers and do their research," said Doug Hirsch, a GoodRx founder. "Our mission was to try to unravel the mystery and help anyone whether insured or not insured to understand what you're going to pay when you go to the pharmacy."

For some customers, Hirsch says the out-of-pocket cost of even a common generic cholesterol-lowering drug can vary by up to $200 for a single prescription.

But in shopping for medications by price, medical professionals says it's prudent to stick with one pharmacy that gives you good savings overall. That allows the pharmacist to see all the medications you're taking and watch for harmful drug interactions.

Cost-cutting consumers can also ask pharmacies for student, senior citizen and other possible discounts. And getting medications in higher dosages and splitting pills can quickly cut prescription costs in half. Many medicines carry the same price regardless of dosage. Those are all strategies Target pharmacy customers could explore as they evaluate if CVS will be the best pharmacy for them.