There are a number of problems with this:
First, pH is a log scale, as RalphMudhouse explained. This means you cannot simply average the pH of your components--it's a lot more complicated than that. Still, this point would suggest that you could somehow calculate the pH, except...
pH is only well-defined for water-based solutions. The definition of pH is based on the concentration of hydronium ions in a water based solution (other solvents not really being relevant for this particular question). Since food is usually a mixture of states (stews, breads, etc.), the concept is ill-defined: the different components of a stew might have different pH, for example.
Additionally, stuff reacts. chemically, food is very complicated, and reactions will happen that may affect the pH. Different ingredients may behave differently, and the resulting reactions are unpredictable for a quantitative, a priori calculation.
However, pH is still important. Just because it can't be calculated doesn't mean it's not relevant: it will still affect stuff like browning. In my experience, you can still gauge acidity by simply tasting as you go: the more acidic something is, the more sour it is (basicity is a bit harder, and I don't have a good solution for that). Also, I don't think a calculation is actually that necessary--a simple intuition of things being basic or acidic is more than enough for home (or even restaurant) cooking.