How To Defragment a Windows 10 Hard Drive

Tune up your PC with the disk defragmenter tool

What To Know

  • Go to Defragment and Optimize Drives, select the drive > Analyze. Select the drive again > Optimize.
  • If you have an HDD, use the Optimize Drives utility to defragment your drive. If you have an SSD, don't defrag at all.
  • Check whether you have an HDD or an SSD drive by using the dfrgui utility.

This article includes instructions for how to defragment your Windows 10 hard drive, including how to check which type of hard drive you have and how to defragment the drive if it's an HDD.

How To Defragment a Windows 10 Hard Drive

If you know you have an HDD type of drive, you can move forward with defragging. First, you'll need to see how badly fragmented it is.

  1. Search 'optimize' in the search box next to the Windows Start icon, and select Defragment and Optimize Drives to open the Optimize Drives window. Select the drive you want to defrag and click Analyze.

    The button to begin analyzing a hard drive.
  2. The analysis could take several minutes. You'll see the progress under the Current status field for the drive you're analyzing.

    The defrag tool analyzing a hard disk drive.
  3. Once the analysis is finished, recheck the Current status field for the results. You'll see the percentage that the disk is fragmented next to the word OK.

    Hard drive fragmentation results.

    The general best practice is that you should keep your hard drive less than 5% for optimal performance. If fragmentation is over 10%, you should run the Optimize utility to reorganize the drive.

  4. If you've decided to defragment your Windows 10 drive, select the drive in the Optimize Drives window again. Then select the Optimize button.

    The Optimize button in Optimize Drives utility.
  5. The Optimize Drives utility will re-analyze the drive and then begin the defragmentation process. Again, you can watch the status of defragmentation by checking the Current status field.

    A drive being defragmented.

    You will see several terms during the defragmentation process, including "analyzed," "relocated," and "defragmented." This will cover several "Passes."

  6. Once this process is completed, you'll see "OK (0% fragmented)" in the Current status field. This means your hard drive is fully defragmented.

    A completed defragmentation process.

Automatically Optimize Your Drive

Instead of trying to remember to do this entire process manually on a regular schedule, you can configure Windows 10 to do it automatically.

  1. In the same Optimize Drives window, click Turn on under the Scheduled optimization section.

    If it's already enabled, it will say Change settings.

    Turning on automatic optimization.
  2. This will open the Optimization schedule window. Select Run on a schedule and set the Frequency you'd like to optimize your drive. If you have more than one drive, select the Choose button to select which drive to set the optimization schedule for.

    Setting up optimization schedule.
  3. Select the drive to optimize on a schedule, enable Automatically optimize new drives, and select the OK button.

    The drive list for setting up defragmentation schedule.
  4. Press OK to return to the main Optimize Drives window. Once there, you can then press Close to close down the whole program since you're done using it.

    Now your Windows 10 PC will automatically defragment your hard drive regularly, so you never have to worry about remembering to do it yourself.

How To Tell if You Have an SSD or HDD

Many Windows 10 computers still come with a Hard Disk Drive (HDD), a mechanical, magnetic disk that stores and retrieves digital data. If your Windows computer has an HDD, then you'll want to defrag the device from time to time. If it has a Solid State Drive (SSD), then you shouldn't defragment it all.

  1. Select the Windows Start icon, type Run, and select the Run App to open the Run box.

  2. Type dfrgui in the Open field and press Enter.

    Launching the disk drive gui.
  3. This will open the Optimize Drives window. You'll see all hard drives installed on your system. If the drive you want to defrag has Hard disk drive in the Media type field, it's an HDD drive. If it has Solid state drive in that field, it's an SSD.

    Optimize Drives window.


A hard disk drive retrieves information by moving a mechanical arm across the disk. If the information it retrieves is fragmented around different parts of the disk, this requires a lot of extra movement and a longer time to retrieve the data (that is, the computer can feel slower than when you first got it).

By contrast, fragmentation on a solid-state drive really won't ever feel any slower because it reads data electronically from each memory storage location without moving parts, so it doesn't matter if the data is fragmented. Also, defragging an SSD actually applies excessive use to the drive. And since SSD memory cells degrade every time you read or write data to it, defragging needlessly consumes the life span of that drive.

Was this page helpful?