I used the first one from the official guide in the calculator and it matches in-game values so it must be correct.
It can be simplified to the following form
v.pth = Math.max((v.oa - v.da)*(0.02275 + 140/(7*v.oa + 2*v.da)) + 90, 60)
Max was used because PTH cannot be lower than 60: