They are quite similar but the difference is that photosynthesis converts carbon dioxide and water into oxygen and glucose, but cellular respiration converts oxygen and glucose into water and carbon dioxide. Basically they just do the opposite things.