You could use the one on the sapim website, that's pretty reliable.
Or you could is this:
Measure the erd, add the rim thickness twice.
Substract the hub flange diameter, measured on the outside of the holes.
Divide by 2.
This is your basesize.
For a 3 cross pattern, add 30 percent of...