This question stems from one I just asked over at Seasoned Advice, where my recipe tasted decidedly off because the pH was wrong.
The recipe called for $\pu{16 g}$ bicarb of soda (sodium bicarbonate, $\ce{NaHCO3}$) and $\pu{15 g}$ of vinegar (mine was 5% acidity, and I assumed a density of $\pu{1 g ml-1}$). I just googled the corresponding pHs of these two, and apparently vinegar is more acidic than bicarb is basic: vinegar has a pH of 2.4–3.4 depending on concentration, and bicarb is pH 9.5.
How can I calculate whether I put too much vinegar or too much bicarb into my recipe? The ratio in the recipe is almost $1:1$.
What ratio in grams do I need of bicarb vs vinegar in order for the result to be neutral? I know there are other contributing factors to the pH in the recipe but I just want to focus on these two first. Assuming the vinegar is 5% which mine was.
Edit:
So I found the explanation for the chemical reaction between bicarb and vinegar here. Relevant bit:
$$\ce{CH3COOH + NaHCO3 → CH3COONa + CO2 + H2O}$$
$$\frac{\pu{1 g}\;\ce{NaHCO3}}{\pu{84.0068 g mol-1}} \times \frac{1}{1} \times \pu{60.0522 g mol-1} = \pu{0.715 g}\;\ce{CH3COOH}$$
What this formula tells you is that every gram of baking soda requires \pu{0.715 g} of acetic acid. But the remaining problem is that vinegar is not pure acetic acid. In fact, most vinegars vary from 4% to 18%.
Using those numbers, you would need somewhere between $\pu{0.715 g}/0.04 = \pu{17.9 g}$ and $\pu{0.715 g}/0.18 = \pu{3.97 g}$ of vinegar, for each gram of baking soda.
If you're lucky you can get some vinegar with the percent acetic acid listed on the label, then you can substitute that number into the equation above to determine how much vinegar you'll need.
So if I plug in my 5%, I get $\pu{0.715 g}/0.05 = \pu{14.3 g}$ vinegar for $\pu{1 g}$ bicarb.
Yikes! This is way more than $1:1$. But I'm not sure if it answers my question. Is the result, $\ce{CH3COONa + CO2 + H2O}$, pH neutral? If yes, then my vinegar does hardly anything to cancel out the base, is that right?
Edit 2:
Okay so according to Wikipedia, $\ce{CH3COONa}$ is a base. So even though my reaction formula shows what happens when all the bicarb/vinegar is used up, the result is not neutral (how much does the water and carbon dioxide contribute to bringing the pH down?). I need more acid to make my sodium acetate neutral (or at least neutral enough to be palatable?). This means that the needed ratio is higher than 14:1!? So almost certainly way too much bicarb?