High drug prices affect everyone: those who pay out of pocket, those with private insurance and even those on Medicare Part D. Some may skip filling prescriptions because they can’t afford them, while others who take expensive drugs may see their insurance premiums rise as a result.

Here are five instances in which medication prices are likely to be especially high, based on Consumer Reports’ analysis of drug-pricing data, and how you can avoid overspending.

In the five years before a brand name drug loses its patent.

Consumer Reports Best Buy Drugs analyzed retail prices for 10 well-known drugs that have either recently become or will soon be available as generics. Using data from nearly 49 million prescriptions filled over the past five years, it found that price increases in some cases were staggering. For example, the retail price of the bone-building drug Boniva (ibandronate) went up more than 100 percent during the five years before it became available as a generic.

Why does this happen? One reason is that drug companies are producing fewer blockbuster treatments, says Stephen Schondelmeyer, a pharmaceutical economics professor at the University of Minnesota. A result is that companies are “milking the cash cow to get as much out of a drug as they can before it goes generic,” he says.

Drug prices can be overly high, but there sometimes are ways to keep those costs down. (Illustration by The Washington Post)

What you can do: Ask whether a generic is available. According to the Food and Drug Administration, 80 percent of all brand-name drugs now have a generic equivalent available.

In new formulations of an older drug.

Extended-release, sustained-release or dissolvable tablets, or even an oral solution, can be convenient medicine — but it can also be expensive. Sometimes the original drug may be available as a generic, as is the case with the sleeping pill Ambien (zolpidem). A week’s worth of five-milligram tablets of generic zolpidem costs an average of $12. But the same amount of the dissolvable version will run you $55, for which no generic is available.

What you can do: Avoid fancy versions of medication, even if they offer some conveniences.

At certain pharmacies.

When the blood-clot-reducing drug Plavix (clopidogrel) became available earlier this year as a generic, secret shoppers from Consumer Reports contacted 30 pharmacies around the country. They found that retail prices for a month’s supply (75 milligrams taken daily) ranged from $179 to $210 at CVS, Target and Walgreens stores to less than $15 at Costco. Wal-Mart consistently quoted a price of less than $50, and two independent pharmacies offered it for between $19 and $49. The online drugstore HealthWarehouse.com charged $15 for a 30-day supply.

What you can do: Shop around. Ask whether your pharmacy has a discount program for generics. Also ask about other discount programs the pharmacy may offer.

With a doctor who is not cost-conscious.

When your doctor gives you a prescription, she is most likely to first consider the effectiveness and safety of the medication, as she should. Affordability is often not considered.

What you can do: Ask about drug costs. This is particularly important for medication taken for many years or for the rest of your life. Although your doctor may not know immediately what your insurance will cover, she can determine if a less-expensive and appropriate generic or therapeutic equivalent may be available.

●From drugmaker discount coupons and ‘freebies.’

To combat higher co-pays on brand-name medication, drug manufacturers have offered more discount coupons and programs in recent years, and more consumers are using them.

Many major name-brand drugs are offered in these discount programs, including Abilify, Actos, Crestor, Cymbalta, Effexor, Lipitor, Nexium and Plavix. But the programs are often designed to capture interest and retain or expand the companies’ market share with low initial costs. Once the program ends or you’re no longer eligible, you’ll have to pay the original price. The coupons also can increase costs for everyone covered under your insurance plan, according to a recent report by the Pharmaceutical Care Management Association, an insurance industry advocate.

For example, if a brand-name drug costs $150 for a one-month supply and the co-pay under your plan is $50, the insurer will pay $100 for your prescription whether you use a coupon that reduces your co-pay.

The same report estimated that coupons could increase drug expenditures by $3 billion annually. Those costs could be passed on to you as higher premiums.

What you can do: Skip the coupons and freebies. The offers can be enticing, but they’re usually not for drugs that are the best first choice. That’s also true for most free drug samples, because after the sample runs out and it’s time to fill the prescription, you could be stuck taking an expensive drug.

Copyright 2012. Consumers Union of United States Inc.