Hello, Lily,
Nice to hear you are thinking ahead. I don't have a definitive (i.e., I didn't look for a technical publication) answer to why benzoic acid is more acidic than stearic acid, but if we look at the two structures, we can justify a reason.
First, benzoic acid is a much smaller molecule than stearic acid:
Benzoic: C6H5COOH molar mass: 122 g/mole pH around 4 (in water)
Stearic: CH3(CH2)16CO2H molar mass: 284 g/mole pH around 6 (in water)
Both molecules have just one carboxylic acid group (-CO2H). That fact alone puts stearic acid at a "disadvantage" when competing for the world acidity championship. The fact that is a long chain of 16 CH2 groups adds to it's misery, since most of the molecule wants to avoid water.
A second reason is that benzoic acid is composed of a benzene ring (the C6H5 in the formula) to which a carboxylic acid group (-COOH) group is attached. The ring of alternating double-bonded carbons creates what's know as a resonance structure, (termed "aromatic") where the electrons flow freely between the ring's carbon valence electrons. This stabilizes the structure, but also creates a slight attraction for the valence electrons in the oxygen on the carboxylic acid group. This makes it slightly easier for a H+ ion to leave, making it slightly more acidic.
I hope this helps,
Bob
Lily P.
Thank you so much for your explanation :)01/17/21