Both the medicines are antacids. However, both have different ingredients. Rantac contains ranitidine, while Famtac contains famotidine.