What a histogram shows you about your files
A histogram is a bar chart that shows how many files you have in each size range — for example, how many files are under 1 MB, how many are between 1 MB and 10 MB, how many are between 10 MB and 100 MB, and so on. It answers the question: where is all my storage actually going? Most people find that a small number of very large files (usually videos, backups, or disk images) take up most of the space, while thousands of small files barely register.
Creating a histogram helps you decide what to back up first, what to delete, and whether you need more storage. It also shows you patterns — like whether you have hundreds of duplicate photos or whether one old project folder is consuming half your drive. You do not need special software; you can build one in a spreadsheet using data you gather from your computer.
Key Takeaways
- A histogram groups your files by size and shows you visually which size ranges hold the most data, revealing where your storage is actually used.
- You can gather file size data using built-in tools: File Explorer on Windows, Finder on Mac, or the command line on any system.
- Once you have the data, a spreadsheet like Excel or Google Sheets can turn it into a bar chart in minutes.
- The most useful size ranges are under 1 MB, 1–10 MB, 10–100 MB, 100 MB–1 GB, and over 1 GB, because they show where the bulk of your storage goes.
Gathering file size data on Windows
Open File Explorer and navigate to the folder or drive you want to analyze. Right-click the folder, select Properties, and note the total size shown. This tells you the overall number, but not the breakdown by file size.
For a detailed breakdown, use the command line. Press Windows key + R, type cmd, and press Enter. Type the following command (replacing C:\ with your drive letter if different):
forfiles /S /M * /C "cmd /c echo @fsize @file" > filelist.txt
This creates a text file called filelist.txt in your user folder with a list of every file and its size in bytes. Open the file in Notepad. The numbers are in bytes, so you will need to convert them: divide by 1,048,576 to get megabytes. This is tedious for large folders, so many people use a free tool like WizTree or TreeSize Free instead, which do the conversion automatically and show you a visual tree of which folders are largest.
Gathering file size data on Mac
Open Finder and navigate to the folder you want to analyze. Select the folder, then press Command + I to open the Info window, which shows the total size. Like Windows, this gives you only the overall number.
For a detailed breakdown, open Terminal (in Applications > Utilities). Type the following command (replacing /path/to/folder with the actual path):
find /path/to/folder -type f -exec ls -lh {} \; | awk '{print $5, $9}' > filelist.txt
This creates a text file with file sizes in human-readable format (KB, MB, GB). Alternatively, use a free app like Disk Diag or OmniDiskSweeper, which show you a visual breakdown of which folders and file types are using the most space.
Organizing your data into size ranges
Once you have your file list, open a spreadsheet (Excel, Google Sheets, or LibreOffice Calc). Create two columns: one labeled Size Range and one labeled Number of Files. In the Size Range column, enter these ranges:
- Under 1 MB
- 1–10 MB
- 10–100 MB
- 100 MB–1 GB
- Over 1 GB
Now count how many files fall into each range. If you used the command line method, you will have a list of file sizes in bytes or megabytes. Go through the list and tally how many files belong in each bucket. If your file list is very long (thousands of files), you can use a spreadsheet formula to count automatically. In Excel or Google Sheets, use COUNTIFS to count files within a range — for example, =COUNTIFS(A:A,">=1",A:A,"<10") counts files between 1 MB and 10 MB if column A contains the file sizes.
Creating the histogram chart
Once your spreadsheet has the size ranges and file counts, select both columns (including headers). In Excel, go to Insert > Chart > Column Chart. In Google Sheets, go to Insert > Chart and select Column Chart from the Chart Type menu. The spreadsheet will automatically create a bar chart with size ranges on the horizontal axis and file counts on the vertical axis.
Label your axes clearly: the horizontal axis should say "File Size Range" and the vertical axis should say "Number of Files". Add a title like "File Distribution by Size". You can adjust colors and styling to make it easier to read, but the default settings are usually fine. The resulting chart shows you at a glance which size ranges contain the most files.
Understanding what your histogram reveals
A histogram with most files in the "Under 1 MB" range and very few in the "Over 1 GB" range is typical for documents, photos, and everyday files. A histogram with a tall bar in the "Over 1 GB" range suggests you have large video files, disk images, or backups taking up most of your space. This is useful information: if you are running out of storage, deleting or moving those large files will free up far more space than deleting thousands of small files.
If you see an unexpectedly tall bar in the "1–10 MB" or "10–100 MB" range, investigate what those files are. They might be old project files, duplicate photos, or cached data you no longer need. A histogram does not tell you which specific files to delete, but it tells you where to look.
Frequently Asked Questions
Can I create a histogram for just one folder instead of my whole drive?
Yes. On Windows, navigate to the folder in File Explorer, then run the command from that location. On Mac, use the Terminal command with the path to that specific folder. The histogram will show only the files in that folder and its subfolders, which is useful if you want to analyze a single project or category.
What if I have thousands of files and counting them manually takes too long?
Use a spreadsheet formula instead. If your file sizes are in column A, create a formula like =COUNTIFS(A:A,">=0",A:A,"<1") to count files under 1 MB. Adjust the numbers for each range. This takes a few minutes and handles any number of files automatically.
Should I include hidden files and system files in my histogram?
For a practical view of what you can delete or back up, exclude system files and hidden files. Most backup decisions focus on files you created or downloaded. If you want to see everything, include them, but the histogram will be less useful for deciding what to remove.
Can I update my histogram later to see if my storage has changed?
Yes. Gather the file data again using the same method, update your spreadsheet with the new counts, and the chart will update automatically. Doing this every few months shows you whether your storage is growing and which size ranges are changing.