Auto-calculating when typing 4 digits