In many ways, yes. The active ingredients in generic drugs and their brand-name counterparts are identical. However, the two drugs may have different inactive ingredients like fillers and coatings. In many cases, generic drugs are significantly cheaper than equivalent brand-name drugs.
GoodRx provides prices for both generic and brand drugs. Our partner, Community Catalyst, has written some helpful guidelines which can help you determine the right choice for you. Read more about the generic-versus-brand issue here.