iPhone locks you out after six failed attempts, then enforces longer and longer delays
Your iPhone will let you enter your passcode incorrectly up to six times in a row. After the sixth wrong attempt, the device locks you out for one minute. If you keep guessing wrong after that, the lockout periods get longer: five minutes after the seventh attempt, fifteen minutes after the eighth, and so on. After the tenth wrong attempt, your iPhone requires you to wait 60 minutes before you can try again.
This is a security feature designed to stop someone else from guessing your code by trial and error. The longer waits make it impractical to run through thousands of possible combinations. If you are locked out of your own phone, you will need to either wait out the timer or use a recovery method like your Apple ID or a computer.
Key Takeaways
- You get six free attempts before any lockout happens; the seventh wrong try triggers a one-minute wait.
- Each subsequent wrong attempt doubles or extends the lockout time, reaching 60 minutes after ten failures.
- After too many failed attempts in a row, your iPhone may erase itself if you have "Erase Data" turned on in Settings.
- If you are locked out of your own device, you can unlock it using your Apple ID, a trusted device, or by connecting to a computer with Finder or iTunes.
- The attempt counter resets if you wait out a lockout period without entering another wrong code.
What happens after each wrong attempt
The first five wrong passcodes produce no delay—you can try again when ready. On the sixth wrong attempt, your iPhone displays a message saying it is disabled and shows a one-minute timer. You cannot enter any code until that minute passes.
If you enter a seventh wrong code after the timer expires, the lockout extends to five minutes. The eighth wrong attempt triggers a fifteen-minute lockout. The ninth and tenth attempts each add to the wait time, with the tenth locking you out for a full hour. After ten consecutive wrong attempts, many iPhones will erase all data on the device if you have enabled the "Erase Data" security setting in Settings > Face ID & Passcode (or Touch ID & Passcode on older models).
The timer resets if you successfully enter your correct passcode during any of these lockout windows. It also resets if you wait long enough without entering another wrong code—typically after the lockout period expires and you do not attempt another guess.
The "Erase Data" setting and what it means
In Settings, under Face ID & Passcode or Touch ID & Passcode, you will find a toggle called "Erase Data." When this is turned on, your iPhone will automatically erase all data after ten failed passcode attempts. This is a deliberate choice you make to protect your phone if it is stolen.
If this setting is off, your iPhone will not erase itself no matter how many wrong attempts are made—it will straightforward keep locking you out for longer periods. You can turn this setting on or off at any time if you have access to your phone and know your current passcode. If you have already locked yourself out, you cannot change this setting until you unlock the device.
How to unlock your iPhone if you are locked out
If you have forgotten your passcode and are locked out, you have several options. The fastest is to use your Apple ID. On the lockscreen, tap "iPhone Unavailable" or the message shown, and you will see an option to unlock with your Apple ID password. This works even if you do not remember your passcode.
If you have a trusted device—another iPhone, iPad, or Mac signed into the same Apple ID—you can use that device to unlock your phone. Go to Settings on the trusted device, find your account, and look for an option to reset your passcode remotely.
You can also connect your iPhone to a computer with Finder (Mac) or iTunes (Windows). Put your phone in recovery mode by holding the side button and volume button together, then following the on-screen prompts. This will let you reset your passcode, though it may erase your data depending on your backup status.
Why the delays get longer
The escalating lockout times exist because a short delay is straightforward to work around—someone could straightforward wait a minute and try again. By making the wait longer each time, Apple makes it exponentially harder for an attacker to guess your code through brute force. After ten attempts, a one-hour wait means a person would need ten hours just to try ten more codes, making the attack impractical.
This design assumes that the person trying to unlock the phone is not you. If you are the owner and have straightforward forgotten your code, the delays are inconvenient but temporary. The security trade-off is intentional: your phone prioritizes protecting your data over letting someone guess quickly.
Resetting your passcode without waiting
You do not have to wait out the full lockout timer if you can verify your identity another way. Using your Apple ID is the quickest method—it proves you own the account tied to the phone, so Apple lets you reset the passcode when ready. This bypasses the timer entirely.
If you do not remember your Apple ID password, you can recover it through Apple's account recovery page using your email address or phone number. This process usually takes a few minutes to a few hours, depending on which recovery method you choose. Once you have reset your Apple ID password, you can use it to unlock your iPhone.
Frequently Asked Questions
Can someone guess my passcode by trying random numbers?
It becomes impractical after a few attempts because of the lockout delays. After ten wrong tries, they would need to wait one hour between each new attempt. A six-digit passcode has one million possible combinations, so reaching all of them would take years even with the delays removed.
Does the attempt counter reset overnight or after I restart my phone?
No. The counter persists through restarts and overnight. It only resets when you enter the correct passcode or when you wait long enough without making another wrong attempt. Restarting your phone will not clear the lockout timer.
What if I turned on "Erase Data" and now I am locked out?
You can still unlock your phone using your Apple ID before the data erases. You have until the tenth wrong attempt to do this. Once the tenth attempt is made, the erasure happens automatically if the setting is enabled. After that, you will need to set up your iPhone as new or restore from a backup.
Can I turn off the passcode lockout feature?
No. The lockout mechanism is built into iOS and cannot be disabled. You can turn off the "Erase Data" setting to prevent automatic erasure, but the timed lockouts after six attempts will always happen.
If I wait out the one-minute lockout, does the counter reset to zero?
Not automatically. The counter resets only if you enter the correct passcode or if you wait a significant amount of time without attempting another wrong code. Waiting out one lockout period and then when ready trying again will continue the sequence toward longer lockouts.