Created a basic formula for deciding length to allow in box