Not an easy question to answer. Often it is best to take the propeller manufacturers recommendation or use the experience of someone else.
The nominal pitch is easy to calculate:
Pitch(inches) = (TAS(MPH)*63360)/(60*RPM)
where TAS is the cruise speed and RPM is the propeller RPM.
This then has to be increased by 5-10% for the 'slip factor'.
Of course the relationship between cruise speed and RPM will vary with propeller pitch.