ratioDB
en · amazon.com

By size

Cheapest new offer per unit for each size

Condition
Currently from

%
At most 1 email a week, always on Monday: how prices per TB for hard drives, SSDs and RAM moved over 7 days. Unsubscribe with 1 click in every email.

Sign in

Enter your address. We email you a link that works for 24 hours. No password.

Should You Defrag an SSD? Why Not and What Windows Does Instead

By Engin BuldakPublished Live figures, as of Nov 17, 2026, 4:17 PM UTC12 min read

Cover image should you defrag an SSD with the TB index curve for M.2 NVMe SSDs on amazon.com

You should not defragment an SSD by hand. Kingston writes that SSDs do not require defragmentation, that defragmenting an SSD is not effective and that doing it continuously over a long period may shorten the drive's life. Windows recognizes SSDs on its own and sends the TRIM command when it optimizes them. Leave that automation on. Defragmenting is only worth it on classic hard drives with spinning platters.

This guide explains what defragmenting does, why it does nothing for SSDs, what Windows does with your SSD in the background and how to check that everything is set up right. The details come from support pages by Microsoft and Kingston that we read for this guide. ratioDB does not run its own hardware tests. We compare prices and spec sheets. What SSDs and hard drives cost per TB right now is shown further down with live amazon.com prices (as of Nov 17, 2026 at 4:17 PM UTC).

What does defragmenting mean?

Defragmenting rearranges the pieces of a file so they sit next to each other on the drive. Microsoft describes it for hard drives as reorganizing the files so that they are all lined up and easier to read. On a hard drive, that saves the read head from moving around.

When saving, the file system spreads a file across free spots. When the drive is full or files are deleted and rewritten often, the pieces of a file end up in many places. The file is then called fragmented. To read a single file, a hard drive has to jump its read head across the spinning platter several times. That takes time. Defragmenting puts the pieces back together.

An SSD has no spinning platters and no read head. Kingston explains that because an SSD has no moving platters, defragmenting does not speed up seek times. For an SSD it makes no difference whether the pieces of a file sit side by side or spread out.

DriveHow it finds dataDoes defragmenting help?
Hard drive (HDD)read head moves over spinning plattersyes, fewer head movements
SSDcontroller reads electronically from flash memoryper Kingston no, not effective

Why should I not defragment an SSD?

Because it brings nothing and costs writes. Kingston writes that defragmenting adds uneven wear to particular areas of the SSD, even though SSDs are designed to spread writes evenly. According to Kingston, occasional defragmentation is harmless, but doing it continuously over a long period may shorten the drive's life.

Flash memory can only take a limited number of writes. Makers specify this as TBW, the amount of data in terabytes written that they guarantee. A defrag tool moves large amounts of data from one place to another. Those are writes with no benefit. How much an SSD can take and what TBW means is in the guide SSD lifespan.

No need to panic, though: if you defragmented an SSD once by accident, Kingston says it did no harm. Only switch off tools that do it regularly, such as older system maintenance tools with their own schedule.

What does Windows do to my SSD when it optimizes?

Windows trims SSDs. Microsoft describes that hard drives are defragmented when optimized, while SSDs are trimmed. Windows tells the SSD which areas it can safely clean up while idle. By default, Windows optimizes your drives once a week.

TRIM is a command the operating system uses to tell the SSD which data has been deleted. Kingston writes that TRIM allows the operating system to inform the SSD that data has been deleted. The SSD can then clean up those areas while idle instead of waiting for the next write. The guide SSD TRIM explains more.

For the PowerShell command Optimize-Volume, Microsoft lists what Windows does per drive when no option is given:

DriveDefault per Microsoft
Hard drive (HDD)analyze and defragment
SSD with TRIM supportretrim, sending TRIM again for all free space
SSD without TRIM supportno operation
Removable drive with FATno operation

According to Microsoft, retrim generates TRIM and unmap hints for all currently unused sectors of the volume, telling the drive they are no longer needed. According to Hanselman, this resends TRIM requests the file system may have dropped along the way. That is why the tool is called "Defragment and Optimize Drives": it defragments hard drives and optimizes SSDs.

Does Windows still defragment my SSD sometimes?

Yes, in one special case about once a month, and that is by design. In its documentation for the defrag command, Microsoft writes that the scheduled task runs traditional optimization on SSDs, including traditional defragmentation and retrim, once per month. In 2014, after checking with the Windows storage team, Scott Hanselman named the condition: when volume snapshots are enabled.

Volume snapshots are turned on by System Restore, for example. In his blog post of December 3, 2014, Hanselman quoted the Windows team with 2 reasons: volume snapshot copy on write gets slow on fragmented SSD volumes, and the file system metadata can only keep track of a limited number of fragments per file. Once that limit is reached, writing or extending a file can fail.

For you this means: this rare defragmentation is intentional and not a bug. According to Microsoft it runs at most once a month. Microsoft also writes that if you manually run traditional defragmentation on an SSD between scheduled runs, the next scheduled run performs analysis and retrim but skips traditional defragmentation on that SSD. There is no reason to switch the automation off.

How do I check whether TRIM is active on my SSD?

Open Command Prompt as administrator and enter fsutil behavior query disabledeletenotify. According to Kingston, a result of 0 means TRIM is enabled in Windows, and 1 means it is disabled.

Here is how, according to Kingston:

  1. Open Command Prompt as administrator: search for "cmd", right-click it and choose "Run as administrator".
  2. Query: enter fsutil behavior query disabledeletenotify and press Enter.
  3. Read the result: 0 means TRIM is active. 1 means TRIM is off.
  4. If it shows 1, turn it on: enter fsutil behavior set disabledeletenotify 0.

The query changes nothing, it is only a check. According to Microsoft, you can trigger a retrim by hand with the defrag command and the /L switch (for example defrag C: /L in Command Prompt as administrator) or in PowerShell with Optimize-Volume and the -ReTrim parameter. Microsoft says the /O switch performs the proper optimization for each media type. According to Microsoft, defrag requires administrator rights.

What do the switches of the defrag command mean?

The defrag command controls the same optimization as the Windows tool, just from Command Prompt. Microsoft lists, among others, /A for analysis, /D for traditional defragmentation, /L for retrim and /O for the proper optimization per media type. Without a switch, defrag performs traditional defragmentation.

The key switches per Microsoft:

SwitchWhat it does per MicrosoftUseful for
/Aperforms an analysis on the specified volumeshard drive and SSD, check only
/Dtraditional defrag, the default without a switchhard drives only
/Lperforms retrim on the specified volumesSSDs
/Oproper optimization for each media typeall drives
/Cperforms the operation on all volumescombined with /O
/Uprints the progress on screenall
/Vverbose output with fragmentation statisticsall

The difference between defrag C: and defrag C: /O matters. Without a switch, Microsoft says defrag performs traditional defragmentation, on an SSD too. With /O, Windows picks what fits the drive, which on an SSD means retrim. If you type the command by hand, use /O, or /L for SSDs. All switches require administrator rights.

What about external SSDs, USB flash drives and memory cards?

Do not defragment USB flash drives and memory cards. Like SSDs they use flash memory, so Kingston's reasoning applies the same way. For removable drives with FAT and SSDs without TRIM support, Microsoft says Windows does nothing at all when optimizing.

For external SSDs on a USB port, Windows decides the same way as for internal ones: if the drive reports TRIM support, Windows sends a retrim when optimizing. If it does not, Microsoft says Windows does nothing. Defragmenting by hand helps an external SSD as little as an internal one. Which external SSD is worth it is in the guide Best external SSD.

Should I turn off automatic optimization?

No. Microsoft writes that Windows optimizes your data drives mostly automatically to maintain performance, by default once a week. On SSDs that is TRIM, on hard drives defragmentation. Both are harmless and both help.

How to check and change the schedule, according to Microsoft:

  1. Type "defrag" in the search box on the taskbar.
  2. Open "Defragment and Optimize Drives".
  3. Under "Scheduled optimization", select "Change settings".
  4. Choose daily, weekly or monthly. You can also turn the schedule off here, which we advise against.

Microsoft recommends increasing the frequency if optimization has been missed 3 times. If your computer is rarely on, the weekly slot can be missed. The list shows when each drive was last optimized. Microsoft notes that if analysis of an SSD is skipped, this "Last run" time is not updated and can be up to a month old. That is not a fault either.

What about defrag tools from other vendors?

You do not need any for SSDs. Kingston writes that SSDs do not require defragmentation, and Windows handles TRIM on its own. Add-on tools that defragment SSDs on a schedule only cause writes with no benefit.

Some system maintenance tools come with their own defragmenter that runs on a schedule. Check in the settings whether SSDs are excluded, or turn the feature off for SSDs. Many SSD makers offer their own tools with maintenance features such as firmware updates and status displays. For everyday use, Windows optimization is enough. If your computer has both a hard drive and an SSD, let Windows manage both: according to Microsoft it picks the proper optimization for each media type.

Is defragmenting still worth it for hard drives?

Yes. On hard drives with spinning platters, defragmenting makes reading faster. For hard drives in the "Defragment and Optimize Drives" tool, Microsoft describes 2 options: let Windows analyze whether the drive needs optimization, or optimize it right away.

The weekly schedule takes care of this in everyday use. Running it by hand is worth it after a big cleanup, for example after deleting many large files and copying new ones.

One exception for hard drives: do not defragment a hard drive that shows read errors or makes noises. Moving large amounts of data puts strain on a struggling drive. Back up the data first. What the noises mean is in the guide Hard drive clicking.

How much do SSDs and hard drives cost per TB right now?

An M.2 NVMe SSD costs $127.99 per TB on amazon.com according to the ratioDB TB index, a 2.5" SATA SSD $120.49 per TB and an internal 3.5" hard drive $34.31 per TB (as of Nov 17, 2026 at 4:17 PM UTC). Per TB, the NVMe SSD is about 3.7 times as expensive as the 3.5" hard drive.

Drive type, default optimization per Microsoft, TB index and cheapest drive at 2 TB on amazon.com, known brands, as of Nov 17, 2026 at 4:17 PM UTC

DriveDefault per MicrosoftTB indexCheapest at 2 TB
M.2 NVMe SSDTRIM (retrim)$127.99Crucial P5 Plus 2 TB: $199.60
2.5" SATA SSDTRIM (retrim)$120.49SP Silicon Power A55 Boost 7mm 2 TB: $234.97
3.5" hard driveAnalyze and defragment$34.31Toshiba 2 TB: $69.99
2.5" hard driveAnalyze and defragment$56.50Seagate BarraCuda 2 TB: $199.00

Cheapest new SSD per capacity on amazon.com, known brands, as of Nov 17, 2026 at 4:17 PM UTC

CapacityCheapest M.2 NVMe SSDCheapest 2.5" SATA SSD
500 GBPatriot P320 512 GB: $83.99 ($164.04 per TB)Patriot Burst Elite 480 GB: $64.99 ($135.40 per TB)
1 TBAdata Legend 710 1 TB: $147.99 ($147.99 per TB)SP Silicon Power A55 Boost 1 TB: $127.97 ($127.97 per TB)
2 TBCrucial P5 Plus 2 TB: $199.60 ($99.80 per TB)SP Silicon Power A55 Boost 7mm 2 TB: $234.97 ($117.49 per TB)
4 TBCrucial P3 Plus 4 TB: $640.66 ($160.17 per TB)SanDisk 520 4 TB: $686.07 ($171.52 per TB)

Prices come live from the ratioDB database and cover new single units from known brands. The cheapest NVMe SSD per TB right now is Crucial P5 Plus 2 TB at $99.80 per TB (2 TB). If your computer with a hard drive feels slow, an SSD is worth a look. When the switch pays off is in the guide SSD vs HDD, and the move itself in Clone HDD to SSD.

All offers by size are on 1 TB NVMe SSD, 2 TB NVMe SSD, 4 TB NVMe SSD, and by form factor on M.2 NVMe SSD, 2.5" SATA SSD, Internal 3.5" hard drives and Internal 2.5" hard drives.

Which mistakes are most common when optimizing SSDs?

The most common mistakes are defragmenting an SSD regularly by hand or with add-on tools, turning off Windows' automatic optimization, leaving TRIM disabled and defragmenting a struggling hard drive.

MistakeResultRight way per source
Defragmenting an SSD regularlywrites with no benefitKingston: SSDs do not require defragmentation
Turning off automatic optimizationno more retrimMicrosoft: Windows optimizes weekly, SSDs by TRIM
TRIM disabledSSD never learns about deleted dataKingston: fsutil behavior set disabledeletenotify 0
Treating the monthly defrag as a bugneedless tinkeringMicrosoft: scheduled task, by design
Running defrag C: without /O on an SSDtraditional defrag on the SSDMicrosoft: /O picks the proper optimization
Defragmenting a struggling hard drivestrain, possible data lossback up the data first
Optimization often misseddrives go unmaintainedMicrosoft: increase the frequency

How does ratioDB compare SSDs and hard drives?

ratioDB pulls amazon.com prices for every listed SSD and hard drive on a regular schedule and converts them to price per TB, with 1 TB equal to 1,000,000,000,000 bytes. The TB index is the median of the 10 cheapest new offers per product type.

M.2 NVMe SSDs, 2.5" SATA SSDs and hard drives sit in separate lists with their own index. Used and renewed offers are labeled and never count toward the index. ratioDB does not test drives itself. The details in this guide come from the linked sources. All rules are on the Methodology page, all SSDs under SSD prices per TB.

About the author

I am Engin Buldak and I built ratioDB. I am 37, grew up in Hamburg, Germany, and still live here. Yes, Buldak like the spicy Korean noodles ( ˘▽˘)っ♨ I like my food hot, my storage prices not so much. ratioDB grew out of my own frustration: the well-known comparison sites simply bored me. I am curious, love clear numbers and have little patience for clunky websites. I bring over 20 years of graphic design, programming and SEO, plus a big love for AI. The result compares hard drives, SSDs and RAM by price per TB and GB, with open math.

Frequently asked questions about defragmenting an SSD

Do you need to defragment an SSD?

No. Kingston writes that SSDs do not require defragmentation and that it is not effective on them. Instead, Windows sends the TRIM command when it optimizes, by default once a week.

Does defragmenting hurt an SSD?

A single defrag does no harm, according to Kingston. Doing it continuously over a long period may shorten the drive's life because it adds uneven wear to particular areas.

Why does Windows still defragment my SSD?

According to Microsoft, the scheduled task also runs traditional defragmentation on SSDs once a month. In 2014 Scott Hanselman named active volume snapshots, for example through System Restore, as the condition. It is by design.

Should I turn off "Optimize Drives" for my SSD?

No. For SSDs, Windows sends TRIM, which helps the drive. Microsoft even recommends increasing the frequency if optimization has been missed several times.

How do I check whether TRIM is active?

Enter fsutil behavior query disabledeletenotify in Command Prompt as administrator. According to Kingston, 0 means TRIM is active and 1 means it is disabled.

Should I defragment a hard drive?

Yes. On hard drives with spinning platters, defragmenting makes reading faster. Windows does it weekly by default. Do not defragment a hard drive with read errors. Back up the data first.

How much does an SSD cost per TB right now?

On amazon.com the TB index is $127.99 per TB for M.2 NVMe SSDs and $120.49 per TB for 2.5" SATA SSDs (as of Nov 17, 2026 at 4:17 PM UTC). The tables above show the cheapest offers.

Sources