How to Calculate SharePoint Folder Size Without File Versions
Question details
The user needs to determine the true size of a SharePoint folder or document library excluding file version history, typically to resolve discrepancies between SharePoint reports and migration tools.

- Product
- SharePoint
- Device & OS
- not provided
- Scenario
- Planning a file migration or auditing storage where third-party migration tools (like Mover) report smaller data sizes than SharePoint's native Storage Metrics.
- Observed behavior
- SharePoint Storage Metrics natively includes all previous file versions in its size calculation, causing it to report significantly more data than the actual size of the current files.
Ensure you have SharePoint Administrator privileges and have the SharePoint Online Management Shell or PnP PowerShell module installed on your system to run the necessary scripts.
Use PowerShell to Calculate Exact Current File Sizes
Since SharePoint's native interface cannot exclude version history from its storage reports, running a PowerShell script is the recommended method to calculate the size of current file versions only.
SharePoint retains multiple versions of documents by default, which counts heavily against your total storage metric. Migration tools like Mover often only transfer the latest version, leading to a reporting discrepancy.
By utilizing PowerShell, administrators can programmatically iterate through document libraries, calculate the file sizes of only the most recently published versions, and ignore the historical version data.
Launch your preferred PowerShell IDE (such as Windows PowerShell ISE) or the SharePoint Online Management Shell with Administrator privileges.
Use a command like 'Connect-PnPOnline -Url "https://yourdomain.sharepoint.com"' to securely authenticate and connect to your SharePoint site.
Run a script designed to loop through the document library items. The script should explicitly pull the '.Length' property of the current file object while omitting the '.Versions' collection to get the true current size.
Use the 'Export-Csv' cmdlet at the end of your script to output the data to a spreadsheet. You can now compare these exact sizes against the reports from your migration tool.

Looking for a Lightweight Document Management Alternative?
If managing complex SharePoint storage and bloated file version histories is becoming a hassle, consider streamlining your local and cloud document workflow. WPS Office provides a lightweight, highly compatible, and free alternative to heavy desktop Office suites.
- 1. Visit the WPS Website: Navigate to the official WPS Office website to access the free installer.
- 2. Download the Software: Click the 'Free Download' button to get the lightweight installation package for your operating system.
- 3. Install and Edit Seamlessly: Run the installer, open your existing Microsoft Office documents, and enjoy seamless editing without worrying about format compatibility.

Frequently Asked Questions
Why is SharePoint Storage Metrics reporting a larger size than my migration tool?
SharePoint Storage Metrics includes the cumulative size of all historical file versions, metadata, and recycle bin data. Migration tools generally only calculate and transfer the current, active version of the files, resulting in a much smaller reported size.
Can I view the size of a SharePoint folder without version history in the web interface?
No, SharePoint's native web interface does not provide a built-in toggle to view folder sizes without including version history. You must use PowerShell scripts to extract this specific data programmatically.
How do I reduce the size of my SharePoint document library?
You can reduce the library size by limiting the number of major versions kept in the Library Settings under 'Versioning settings', manually deleting old versions of large files, or emptying both the first and second-stage recycle bins.




