The molecular formula of a compound gives us the idea about the elements that make up the particular compound, and the number of atoms of each element present in the compound. The molecular formula of ribose is C5H10O5. The molecular formula of deoxyribose is C5H10O4.
Similarities
Ribose and deoxyribose are both monosaccharides or simple sugars.
Both are aldopentoses, which means both are pentose sugar molecules which, in their open-chain form, have an aldehyde functional group at one end. A pentose sugar is one that is made up of 5 carbon atoms.
Differences
While a molecule of ribose has 5 oxygen atoms, a molecule of deoxyribose has only 4 oxygen atoms.