What defragmentation does and when you need it
Defragmentation rearranges the scattered pieces of your files so your hard drive can read them faster. Over time, as you save, edit, and delete files, Windows stores the pieces of each file in different physical locations on your disk. Your drive has to jump around to collect all the pieces, which slows down file access. Defragmentation gathers those pieces back together in order.
You need defragmentation most if you use a traditional hard disk drive (HDD). If your computer has a solid-state drive (SSD), you should not defragment it — SSDs work differently and defragmentation can actually shorten their lifespan. Windows 10 and 11 run defragmentation automatically on a schedule, but you can also run it manually if your computer feels sluggish or you have not defragmented in several months.
Defragmentation takes time — anywhere from 15 minutes to several hours depending on your disk size and how fragmented it is. Close other programs before you start, and do not interrupt the process once it begins.
Key Takeaways
- Defragmentation only helps traditional hard drives (HDD), not solid-state drives (SSD), and Windows runs it automatically in the background.
- You can manually defragment through the Optimize Drives tool in Windows 10 and 11 by searching for "Optimize" in the Start menu.
- The process can take 15 minutes to several hours and should run without interruption, so close other programs first.
- Check whether your drive is fragmented before defragmenting — Windows will show you a percentage, and anything under 10 percent usually does not need it.
How to find the Optimize Drives tool in Windows
Open the Start menu and type Optimize into the search box. Click on "Optimize Drives" when it appears in the results. This opens the Optimize Drives window, which shows all the drives connected to your computer.
The window displays each drive's name, media type (HDD or SSD), and current fragmentation percentage. If you see "Solid state drive" listed as the media type, do not defragment that drive. If you see "Hard disk drive," that is the drive you can defragment.
Check your fragmentation percentage before you start
Look at the percentage shown next to your hard drive in the Optimize Drives window. This number tells you how fragmented your drive is. If the percentage is below 10 percent, defragmentation will not make a noticeable difference and you can skip it. If it is 10 percent or higher, defragmentation may speed up your computer.
You do not have to defragment every time the percentage rises. Many users only defragment when the number reaches 15 to 20 percent or when they notice their computer running slowly. Windows also runs defragmentation automatically on a weekly schedule, so manual defragmentation is optional for most users.
Run defragmentation manually
Select the hard drive you want to defragment by clicking on it once. Then click the Optimize button at the bottom right of the window. A progress bar will appear showing how far along the process is.
The defragmentation process runs in the background, but your computer will be slower while it works. Close web browsers, email, video players, and any other open programs. Do not put your computer to sleep, restart it, or shut it down until the process finishes — interrupting defragmentation can leave your drive in a worse state than before.
Depending on your drive size and fragmentation level, the process may take anywhere from 15 minutes to several hours. You can check the progress bar periodically, but there is no way to speed it up once it has started.
What to do if defragmentation is taking too long
If the process has been running for more than four hours and the progress bar has barely moved, your drive may have a hardware problem or be nearly full. Stop the defragmentation by closing the Optimize Drives window, then restart your computer normally.
Before trying again, check how much free space you have on your drive. Open File Explorer, right-click on your hard drive, and select Properties. If you have less than 15 percent of your total drive space free, defragmentation will be very slow or may not complete. Delete unnecessary files, empty your Recycle Bin, or move large files to an external drive to free up space, then try defragmentation again.
Automatic defragmentation in Windows
Windows 10 and 11 automatically defragment your hard drives on a schedule — usually weekly. You can see when the next automatic defragmentation is scheduled by opening the Optimize Drives window and looking at the "Last run" date shown for each drive.
If you want to change when automatic defragmentation runs, click the Change settings button in the Optimize Drives window. You can set it to run daily, weekly, or monthly, or turn it off completely. Most users should leave automatic defragmentation turned on, since it runs when you are not actively using your computer.
Frequently Asked Questions
Will defragmentation make my computer faster?
Defragmentation can improve speed if your drive fragmentation is above 10 percent and you use a traditional hard drive. The improvement is usually most noticeable when opening large files or launching programs. If your drive is an SSD, defragmentation will not help and may cause harm.
Can I use my computer while defragmentation is running?
You can, but your computer will run much slower because the drive is constantly moving data around. Close other programs and avoid opening large files or running programs that use a lot of disk space. Do not restart or shut down your computer until defragmentation finishes.
What if I have both an HDD and an SSD?
Defragment only the HDD. In the Optimize Drives window, you will see both drives listed with their media type. Click on the HDD, then click Optimize. Leave the SSD alone — Windows will not let you defragment it anyway.
How often should I defragment my hard drive?
If Windows automatic defragmentation is turned on, you do not need to do it manually. If you turn automatic defragmentation off, run it manually once a month or whenever fragmentation reaches 15 to 20 percent. Most users with automatic defragmentation enabled never need to think about it.
Why is my defragmentation stuck at 0 percent?
Your drive may be too full, or another program may be accessing files while defragmentation tries to run. Close all open programs, restart your computer, and try again. If it still does not work, free up at least 15 percent of your drive space by deleting files or moving them to an external drive.