Updated calc method to handle short inputs