Summary Do you need to see what the total size of a folder is within SharePoint Online? There is a way you can calculate folder sizes through the SharePoint Online UI. If you need to run complex storage calculations, there are multiple scripts you can run in PowerShell.
Scenario The following scenarios may require the knowledge of this article:
Uncovering errors when users are trying to move/copy folders that are too large
Managing space and storage capacity for sites and document libraries
To check the size of folders through the SharePoint Online UI follow these steps:
Navigate to the site > Click on the Settings Gear > Click on "Site Information" and click on "View all site settings"
Click on "Storage Metrics" under the "Site Collection Administration" heading
Click on the document library to navigate to the location where the target folder is stored
If you need to do more complex calculations across the same site or multiple sites, you can use PowerShell. See the website below for more complex PowerShell scripts for calculating folder sizes. https://www.sharepointdiary.com/2018/06/sharepoint-online-get-folder-size-using-powershell.html