Calculator for test pressure and allowable leakage