1. Open the Windows 8 explorer
2. Right-click on the hard drive that you think is fragmented and click on Properties
3. Go to the Tools tab and click on Optimize now at the bottom:
4. The built-in Windows 8 defragmentation program opens. By default, Windows 8 schedules a weekly disk defragmentation. So, even if you have not defragmented your disk, Windows 8 might have done it for you and your disk might not even require a defragmentation.
5. Select the drive that you want to analyze and click the Analyze button
Windows 8 will analyze your hard drives and will let you know if you should defragment it.