Software & Apps Windows 261 261 people found this article helpful How to Defrag Your Windows Computer Speed up your computer with the Windows disk defrag tool by Mark Baggesen Writer Mark Baggesen is a former Lifewire writer who has 20+ years' experience and has in web development, communications, web analytics, and databases. our editorial process LinkedIn Mark Baggesen Updated on November 12, 2019 Windows The Ultimate Laptop Buying Guide Tweet Share Email Files stored on a hard drive become fragmented over time, meaning that parts of the files are stored in separate areas of the drive instead of right next to each other. When this happens, it can take longer for the OS to open the file. A defrag can fix this. While there are lots of free, third-party defragmenters, the Windows disk defragmenter can be used right now without having to download anything since it's built into the operating system. Instructions in this article apply to Windows 10, Windows 8, and Windows 7. Should You Defrag Your Computer? The Windows defrag tool runs automatically once a week, in Windows 10, Windows 8, and Windows 7, so you probably don't need to defrag on your own. Run the analyzer first and if it's less than 10% fragmented, the drive does not need to be defragged. If you want to defrag on your own time, anyways, you can open the program anytime you want and run a manual defrag. You can get to it by searching through Windows or by browsing through Administrative Tools via Control Panel. Defragging isn't necessary on solid state hard drives since there aren't any spinning parts. Since the hard drive doesn't need to spin to find all the file's pieces, there isn't a lag between the time it takes to find the file and the time it takes to open it. 01 of 04 Prepare Your Computer for Defragmentation ikuvshinov / iStock Before you defrag your computer, you must take a number of steps first. Read this entire procedure before you use the defrag utility. Make sure your work is backed up, such as to an online backup service, a second local hard drive, an external hard drive, a flash drive, or a CD or DVD.Make sure the hard drive is healthy. Use CHKDSK to scan and fix the drive.Close any programs that are currently open, including virus scanners and other programs that have icons in the system tray (right-hand side of the taskbar).Assure your computer has a constant source of power. The important thing is to be able to stop the defragmentation process if there is a power outage.If you have frequent power issues or other outages, you should not use a defragmentation program without a battery backup. If your computer does shut off while defragmenting, it may crash the hard drive or corrupt the operating system, or both. 02 of 04 Open the Defrag Program The Windows defrag program is accessible through Control Panel in all versions of Windows, but the procedure for getting there is slightly different depending on which version of Windows you're using. Open Control Panel. A fast way to do this in any version of Windows is through the Run dialog box (WIN+R). Just enter control to open Control Panel.Go to System and Security.Select Administrative Tools.If you're on Windows 7, select Defragment your hard drive just below the Administrative Tools heading to open Disk Defragmenter.Windows 10 and Windows 8 users should launch the program called Defragment and Optimize Drives. A much quicker way to get to the disk defrag utility is to run the dfrgui command in Windows 10 from the Run dialog box. 03 of 04 Analyze the Hard Drive Before starting the defrag, you'd be wise to analyze the drive first. This step checks the drive for fragments and reports back how fragmented the drive really is, after which you can choose to defrag or skip the hard drive and not run a defrag. Choose the Analyze button (Windows 10/8/XP) or Analyze disk button (Windows 7) to check for fragments on all the connected hard drives.Take note of the fragmentation level shown next to each drive.If the level of fragmentation seems high (above 20 percent), move on to the next step to defrag the drive. Otherwise, you're probably safe skipping the defrag.Another way to know if you should defrag the hard drive is to read what the defrag tool says on the screen. If it says the drive is OK, then you're fine not running the defrag. Windows Vista does not include an option to analyze the hard drive. 04 of 04 Defrag the Hard Drive If you've chosen to defrag the hard drive, it's just a click away. However, the button for defragging the drive is called something different in some versions of Windows. Select the hard drive you want to defrag.Click the button to start the defrag.Windows 10 and Windows 8 call it Optimize. Windows 7 uses the term Defragment disk. It could take anywhere from several minutes to several hours to defrag a hard drive. The time it takes to run a defrag on your hard drive depends entirely on the number of file fragments the tool identifies, the size of your hard drive, and the speed of your computer. We have found it's best to start the defrag and then go to bed. With luck, it'll be done when you wake up in the morning.