How to change drive partition size on Windows 10

Windows 10 includes three ways to shrink or extend a partition, and this guide walks through the steps to complete this configuration.

Windows 10 change partition size
Windows 10 change partition size / Image: Mauro Huculak
  • To resize a partition on Windows 10, open Disk Management, right-click the partition, choose “Shrink Volume” or “Extend Volume,” and continue with the wizard.
  • You can also use the commands from Command Prompt and PowerShell to complete this configuration.

On Windows 10 (and older versions like Windows 7 and 8), sometimes, you may need to shrink or extend the available space of a given partition to make room to create additional partitions using the unallocated space or store more data on the same section of the drive.

There are many reasons to change the size of a partition. For example, you may want to shrink the primary partition to make space for creating another partition and dedicating different spaces for different purposes, like one for Windows (C drive by default) and another for your files (D drive).

If you want to setup a dual-boot system on your computer, you must create separate partitions for each one to prevent the need for another physical drive.

Some users separate partitions to improve security by isolating critical system files from user data.

What’s a drive partition, and the difference between it and volume?

A partition is a way to divide the raw storage inside the hard drive into different logical sections, which then act as separate drives in the operating system, even though they are in the physical disk. 

Sometimes, a “partition” can also be confused with a “volume,” while these terms can be interchangeable, there are some differences.

A partition is a logical division of physical storage on a hard disk drive (HDD) or solid-state drive (SSD). On the other hand, a volume is a formatted section of storage that, in this case, Windows can recognize and access. Typically, a volume includes a file system (such as NTFS or ReFS) that allows Windows to organize and manage files. 

In most cases, a single partition becomes a single volume, but some advanced configurations can combine multiple partitions into a single volume or even span volumes across multiple physical disks.

Whatever the reason, Windows 10 includes several tools to resize a partition without formatting or risking data loss, including the legacy Disk Management tool, Command Prompt, and PowerShell.

When you use either of these tools, you can change the partition size on the “C” drive and secondary drives, including internal and external storage and USB flash drives.

In this guide, I will explain the steps to shrink and extend the size of a partition on Windows 10 without third-party tools.

Warning: While these are non-destructive methods, creating at least a temporary backup of your computer is still recommended in case something goes wrong, such as data corruption or accidental deletion. You have been warned.

Change partition size from Disk Management on Windows 10

The legacy Disk Management tool is the easiest way to shrink or extend the partition size without formatting. This option is available on Windows 11 and 10 as well as older versions, such as Windows 8 and 7.

Shrink partition size with Disk Management

To reduce the partition size with Disk Management, use these steps:

  1. Open Start on Windows 10.

  2. Search for Create and format hard disk partitions and click the top result to open the Disk Management console.

  3. Right-click the drive you want to change its partition size and select the Shrink Volume option.

    Shrink volume option

  4. Confirm the amount of space to shrink the partition (in megabytes).

    Shrink space setting

    Quick note: As you change the size value, you can confirm the total size of the unallocated space after shrinking the original partition.
  5. Click the Shrink button.

Once you complete the steps, the drive partition will be reduced to the specified size.

Extend partition size with Disk Management

To increase the drive partition size from Disk Management, use these steps:

  1. Open Start.

  2. Search for Create and format hard disk partitions and click the top result to open the Disk Management console.

  3. Right-click the drive to change its partition size and select the Extend Volume option.

    Extend volume option

  4. Click the Next button.

  5. Choose the disk with available space under the “Selected” section (if applicable).

    Quick note: In some cases, you may need to select the disk from the “Available” section and then click the “Add” button to make it available.
  6. Confirm the space to use to increase the drive partition (if necessary).

    Increase partition size on Windows 10

  7. Click the Next button.

  8. Click the Finish button.

After completing the steps, the partition will change to the specified size. If the “Extend volume” option is greyed out, the physical drive doesn’t have any space to increase the volume.

Change partition size from Command Prompt on Windows 10

If you need to use commands to resize a partition on Windows 10 without losing data, use the diskpart tool with Command Prompt.

Shrink partition size with diskpart

To shrink a partition with Command Prompt, use these steps:

  1. Open Start.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to start diskpart and press Enter:

    diskpart
  4. Type the following command to list the volumes and press Enter:

    list volume
  5. Type the following command to select the volume to shrink the partition and press Enter:

    select volume 4

    In the command, change 4 for the number representing the partition you want to modify.

  6. Type the following command to determine the space you can decrease the partition and press Enter:

    shrink querymax
  7. Type the following command to shrink the drive partition by a specific amount (in megabytes) and press Enter:

    shrink desired=20480

    In the command, change 20480 for the amount (megabytes) you want to shrink the partition.

    diskpart shrink partition

  8. (Optional) Type the following command to shrink the partition by its maximum space reclaimable and press Enter:

    shrink

Once you complete the steps, diskpart will reduce the partition size to the new smaller size.

Extend partition size with diskpart

To increase the drive partition size with diskpart, use these steps:

  1. Open Start.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to start diskpart and press Enter:

    diskpart
  4. Type the following command to list the available disks and their capacity, and press Enter:

    list disk
    Quick note: Identify the drive’s total size with the partition to extend.
  5. Type the following command to list the volumes and press Enter:

    list volume
  6. Type the following command to select the volume to shrink the partition and press Enter:

    select volume 4

    In the command, change 4 for the number representing the partition you want to modify.

  7. Type the following command to increase the size of the partition and press Enter:

    extend size=20480

    In the command, change 20480 for the amount (megabytes) you want to increase the partition.

    diskpart extend partition

  8. (Optional) Type the following command to increase the size of the partition using all contiguous free space that is available on the drive and press Enter: extend

    extend

After you complete the steps, the partition will extend to the new size without losing your data.

Resize partition using PowerShell on Windows 10

It’s also possible to make partitions smaller or larger using PowerShell commands.

Shrink partition size with PowerShell

To make a partition smaller with PowerShell, use these steps:

  1. Open Start.

  2. Search for PowerShell, right-click the top result, and select the Run as administrator option.

  3. Type the following command to list all the drives and their total size, and press Enter:

    Get-Disk
  4. Type the following command to list the available partitions on the drive and Enter:

    Get-Partition -DiskNumber 1

    In the command, change 1 for the drive number with the partition you want to shrink.

  5. (Optional) Type the following command to understand the minimum and maximum space you can resize the partition and press Enter:

    Get-PartitionSupportedSize -DiskNumber 1 -PartitionNumber 1

    In the command, change the number of disks and partitions that correspond to your situation. Also, SizeMin and SizeMax are specified in bytes, meaning you may need to use an online converter to understand the information in gigabytes or any other size.

  6. Type the following command to resize the partition to 20GB and press Enter:

    Resize-Partition -DiskNumber 1 -PartitionNumber 1 -Size (20GB)

    PowerShell change partition size to smaller

    In the command, replace the disk and partition number and size for the information corresponding to your drive and the size you want to shrink the drive. Also, I’m using GB, but you can also specify the space in bytes, KB, MB, and TB

Once you complete the steps, PowerShell will shrink the partition to the specified size, leaving additional unallocated space to create additional partitions.

Extend partition size with PowerShell

To extend the partition size with PowerShell, use these steps:

  1. Open Start.

  2. Search for PowerShell, right-click the top result, and select the Run as administrator option.

  3. Type the following command to list all the drives and their total size, and press Enter:

    Get-Disk
  4. Type the following command to list the available partitions in the drive and press Enter:

    Get-Partition -DiskNumber 1

    In the command, change 1 for the drive number with the partition you want to extend.

  5. (Optional) Type the following command to understand the minimum and maximum space you can resize the partition and press Enter:

    Get-PartitionSupportedSize -DiskNumber 1 -PartitionNumber 1

    In the command, change the disk and partition number to match your situation.

  6. Type the following command to increase the partition to 40GB and press Enter:

    Resize-Partition -DiskNumber 1 -PartitionNumber 1 -Size (40GB)

    In the command, replace the disk number, partition number, and size for the information corresponding to your drive and the size you want to increase the partition.

    PowerShell increase partition size

  7. (Optional) Type the following command to extend the partition to its maximum size and press Enter:

    Resize-Partition -DiskNumber 1 -PartitionNumber 2 -Size 64407715328

    In the command, replace the disk and partition number with the information that corresponds to your situation. Also, to specify the new size of the partition, use the SizeMax number available in step 4.

After you complete the steps, the partition will cover the entire available space or the specified amount.

You can also use third-party tools like GParted to change the size or move the partition to a different section on the physical hard drive.

In addition to using these tools, you can also manage and create custom partitions while installing Windows 10. This approach comes in handy to divide the drive space from the beginning, which many times is less risky.

Update April 12, 2024: This guide has been updated to ensure accuracy and reflect changes to the process.

About the author

Mauro Huculak is a Windows How-To Expert who started Pureinfotech in 2010 as an independent online publication. He has also been a Windows Central contributor for nearly a decade. Mauro has over 15 years of experience writing comprehensive guides and creating professional videos about Windows and software, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 21 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter), YouTube, LinkedIn and About.me. Email him at [email protected].