Computation of interface shape and maximum force in surface tension measurements