If your iPhone says the passcode is incorrect, stop trying more codes for now. The message means the phone rejected the sequence it received, but it does not tell you why. You may be remembering an older passcode, responding to a different kind of passcode prompt, or dealing with taps that are not registering correctly. Check which code the iPhone is asking for before taking further steps, because repeated incorrect attempts cause longer lockouts and can erase the phone if Erase Data is enabled.
First, identify which code the iPhone is asking for
Not every code prompt is asking for your iPhone’s Lock Screen passcode. Check the wording on the screen and match it to the code being requested:
- iPhone unlock passcode: Used to unlock the iPhone and for some security-sensitive actions. It can be a six-digit or four-digit code, a custom numeric code, or a custom alphanumeric code.
- Screen Time passcode: A separate code used to change Screen Time settings, limits, or restrictions. It is not the iPhone unlock passcode.
- Apple Account password: A separate account credential that may be required for some erase-and-reset procedures. It is not usually the code used at the Lock Screen.
If the phone is asking for the unlock passcode after a restart or after several unsuccessful Face ID or Touch ID attempts, that can be normal. Being asked for the passcode instead of biometrics does not, by itself, mean the passcode has changed.
Why a familiar passcode may suddenly be rejected
The passcode may have been changed
Consider whether you—or someone else with access to the iPhone—might have changed the code recently. You may be entering the previous code from memory even though the iPhone now expects the new one.
If the passcode was changed within the previous 72 hours, an iPhone running iOS 17 or later may let you use the previous passcode once to regain access and set a new one. This option is subject to Apple’s conditions, including having an active cellular or Wi‑Fi connection and Find My being enabled.
The screen may not be registering your taps correctly
A cracked, dirty, wet, or obstructed screen can make taps intermittent or inaccurate. If the keypad is not responding consistently, the iPhone may receive a different sequence from the one you intended. Do not keep testing codes while the screen is behaving this way; incorrect entries can add lockout delays.
A work or school policy may apply
If the iPhone says the passcode has expired, a work or school Mobile Device Management (MDM) requirement may be involved. Check Settings > General > VPN & Device Management. If the iPhone is managed by an organization, contact its administrator for guidance.
What to check before trying another code
- Read the prompt carefully. Confirm whether it asks for the iPhone unlock passcode, a Screen Time passcode, or your Apple Account password.
- Think about recent changes. If the unlock passcode may have been changed within the last 72 hours, check whether the previous-passcode recovery option is available before continuing with guesses.
- Check the keypad response. If taps seem inaccurate or intermittent, stop entering codes and troubleshoot the screen first.
- Stop if you are unsure. Repeated guessing does not identify the cause and can increase the lockout or data-loss risk.
Use the previous passcode option if it is available
On an eligible iPhone running iOS 17 or later, the previous-passcode reset feature may be available for up to 72 hours after a passcode change. It lets you use the old passcode once, then immediately set a new one.
- On the Lock Screen, enter the code until iPhone Unavailable appears.
- Tap Forgot Passcode?.
- If the option appears, choose Enter Previous Passcode and follow the on-screen instructions.
- Set a new passcode when prompted.
This option is not available on older iOS versions, after the 72-hour window, or if the previous passcode was expired sooner. The setting to expire a previous passcode is Settings > Face ID & Passcode (or Touch ID & Passcode) > Expire Previous Passcode Now.
Fix an unresponsive or inaccurate passcode keypad
If the screen is not registering taps reliably, Apple recommends troubleshooting the screen before making more passcode attempts:
- Restart the iPhone.
- Clean and dry the screen.
- Disconnect Lightning or USB‑C accessories.
- Remove the case or screen protector and check whether the keypad responds more accurately.
If the touch problem continues, the iPhone may need service. Avoid repeated passcode testing while troubleshooting, since each incorrect entry can contribute to a longer lockout.
Understand lockout delays and the risk of erasing data
Incorrect Lock Screen entries can trigger increasingly long waits. Apple documents these delays:
- After the fourth attempt: 1 minute
- After the fifth attempt: 5 minutes
- After the sixth attempt: 15 minutes
- After the seventh attempt: 1 hour
- After the eighth attempt: 3 hours
- After the ninth attempt: 8 hours
At 10 or more attempts, the iPhone is locked and must connect to a Mac or PC. If Erase Data is enabled under Settings > Face ID & Passcode (or Touch ID & Passcode), 10 consecutive incorrect passcode attempts erase the iPhone. A work or school management policy may set a lower failed-attempt threshold.
If the iPhone still will not accept the passcode
If you cannot regain access with the current or previous passcode, the remaining reset options erase the iPhone. You can restore backed-up data during setup if a backup is available.
Reset from the Lock Screen if eligible
Apple supports a Lock Screen reset on iOS 15.2 or later when the required conditions are met, including that Find My was enabled and the iPhone has an active network connection. On iOS 17 or later, the flow uses Forgot Passcode?. On iOS 15.2 or iOS 16, it uses Erase [Device]. Follow the prompts shown on the iPhone; the reset erases its data.
If the Lock Screen does not offer an eligible reset option, use Apple’s computer-based reset process with a Mac or Windows PC. This also erases the data currently on the iPhone. During setup, restore from a backup if you have one.
When to contact your organization or seek service
- Contact your work or school administrator if the iPhone is managed or displays a passcode-expiration message.
- Seek service if the keypad continues to register taps inaccurately after restarting, cleaning and drying the screen, disconnecting accessories, and removing the case or screen protector.
- Use an erase-and-reset option only when needed, since resetting removes the data currently on the iPhone.