I'd like to re-visit this with some data. I have obtained some Lactic Acid but unsure how much to use.
My water is:
Total alkalinity as CaCO3 = 75mg/L
Calcium 30mg/L
Magnesium 2mg/L
Sodium 4mg/L
Chloride 3mg/L
Sulphate as SO4 3mg/L
pH 7.65
Mashing in 22 Litres
The object of acid addition is to neutralize the alkalinity of your water and grains such that the pH of the mash (a mixture of the two) is at a desirable value. Let's use 5.4 as an example here. The water has alkalinity of 75/50 = 1.5 mEq/L. To get a liter of that water from 7.65 to 5.4 would require the addition of 1.37 mEq of acid. This can be calculated using the formulas at
https://www.homebrewtalk.com/showthread.php?t=473408. The amount of acid required is in this case 91.5% of the alkalinity and it will always be quite close to that with the exact requirement depending on the source water pH and the desired mash pH. For a desired mash pH of 5.5 here with this water you would need 89.2% of the alkalinity. Rule of thumb: use 90%.
For 22 L of water you are going to need 22*1.37 = 29.48 mEq of acid to neutralize your water's alkalinity to pH 4.5.
Now as other posters have pointed out the calcium in your water will react with malt phosphate to produce a couple of mEq of protons. The number all the programs use is (Ca mEq/L)/3.5 but that number includes protons released in the kettle and was derived from analysis of German lager brewing. The number of protons released in the mash will be less than this but as it is the only solid number we have we will use it. It is 0.21 mEq/L for you water with its calcium hardness of 1.5 mEq/L. Deducting this from the acid required for alkalinity and adding in the smidgeon of acid needed in excess to actually give pH 5.4 to the water requires a total of 30.18 mEq.
It's the same story with malts. Each has a DI mash pH and buffering capacity. To calculate the required acid subtract the DI mash pH from the desired pH from and multiply by the mEq/kgpH and then the kg of the malt. Here are the data on 3 pilsner malts:
Weyermann Pneumatic Pils: pHdi = 5.62 Buffering: -40.69
Weyermann Floor Pils: pHdi = 5.85 Buffering: -31.30
Rahr Pils: pHdi 5.80 Buffering: -46.27
Supposing you choose the pneumatic pils. Then
(5.4 - 5.62)*(-40.69)*6 = 53.71 mEq
OTOH with the floor Pils it's
(5.4 - 5.85)*(-31.3)*6 = 84.51
And with the Rahr...
(5.4 - 5.80)*(-46.27)*6 = 111.05 mEq
These data illustrate that you can have a base malt acid requirement that varies by a factor of 2 depending on which of three types (for which I have data) of Pilsner malt you chose. Whatever you have will not very probably match any of these and so the major part of your acid requirement will be different. The point is that if software is asking you what color the malt is or what type it is then it is not asking you enough and cannot calculate the correct acid addition for that malt nor estimate mash pH accurately.
The other malts all have proton deficits of their own. More uncertainties are attached to them unless you have data on the actual malt you are using:
(5.4 - 5.65)*(-32)*1.2 = 9.6
(5.4 - 6.07)*(-44.9)*0.5 = 15.04
0.5 kg unmalted Canadian Wheat
?? Probably something like the flaked barley
(5.4 - 5.64)*(-31.07)*0.5 = 3.73
(5.4 - 5.64)*(-31.07)*.15 = 1.12
(5.4 - 5.2)*(-23.2)*.5 = -2.32
Note that this last malt has a DI pH less that the target and thus it contributes protons to the mix (though not many).
Adding up all the proton requirements including those of the water you would need between 117.6 (Weyerman pneumatic) and 172.9 (Rahr) mEq of acid. At pH 5.4 the strength of 88% lactic acid is 11.44 N (mEq of protons per mL of the acid) so you would need from 117.6/11.44 = 10.3 to 173/11.44 = 15.1 mL of the acid for the mash.
It has been suggested by others that the necessary pH adjustment be realized by addition of calcium. As mentioned earlier Kohlbach's formula applies to knockout, not mash, but assuming we got all the protons he promises in the mash the calcium level required to supply 173 mEq from 22 L of water is 1.130 grams of calcium per liter. Thus one clearly cannot rely on calcium to take care of this level of alkalinity.