You have 20,000 photos, a few thousand songs and a pile of video. How much storage do they need, and how much will you need in three years? You do not need a rule of thumb. Each kind of media has a formula, and a table adds the results.
This guide gives the three formulas, works each one with labeled example inputs, and combines them into a planning table. Uncompressed numbers are upper bounds. Compressed sizes depend on the codec, the content and the encoder settings, so the examples use stated assumptions that you should replace with measurements from your own files.
Three formulas, one planning table
| Media | Formula | Calculator |
|---|---|---|
| Photo | bytes = width × height × bits per pixel ÷ 8 |
image file size |
| Music | bytes = sample rate × bytes per sample × channels × seconds |
audio file size |
| Video | bytes = bitrate × seconds ÷ 8 |
video file size |
The photo formula follows the PDF specification, which describes an image by its width, height, number of color components and bits per component. The audio formula is the one MDN gives for uncompressed samples. The video formula applies to the compressed bitrate you choose, because uncompressed video is far larger. Convert the totals with the storage units calculator.
Photos: pixels first, then compression
MDN notes that image compression "can be lossy, discarding image data to get much smaller files, or lossless, reproducing the original exactly." The uncompressed figure is the ceiling for any format. The stored size is the ceiling divided by a ratio that depends on the image and on the format. The pixel count itself is the subject of what a megapixel is.
Worked example. Example: 20,000 photos of 6,000 × 4,000 pixels (24 million pixels) at 24 bits per pixel.
uncompressed = 6,000 × 4,000 × 24 ÷ 8 = 72,000,000 bytes per photo
The compression ratio is an assumption, so the table tries three.
| Assumed ratio | Bytes per photo | 20,000 photos |
|---|---|---|
| 4 : 1 | 18,000,000 | 360 GB |
| 8 : 1 | 9,000,000 | 180 GB |
| 16 : 1 | 4,500,000 | 90 GB |
The spread between 90 GB and 360 GB is the reason to measure. Take a sample of your own photos, divide their average stored size into 72,000,000 to get your ratio, and use it in place of the assumed ones.
Music: a formula from MDN
MDN gives the arithmetic for uncompressed audio. Multiply the channels, the bytes per sample and the sample rate to get bytes per second, then multiply by the duration. Its example is stereo, 16-bit samples at 48 kHz: 2 × 2 bytes × 48,000 = 192,000 bytes per second, so a 3-minute song takes 192,000 × 180 = 34,560,000 bytes uncompressed.
For compressed audio, MDN reports that lossless algorithms "usually output a file 40-50% of the original uncompressed size," while modern lossy algorithms "can output results between 5-20% of the original size, depending on the complexity of the audio."
Worked example. Example: 3,000 songs of 4 minutes (240 seconds), with 44,100 samples per second, 2 bytes per sample and 2 channels.
bytes per second = 44,100 × 2 × 2 = 176,400
bytes per song = 176,400 × 240 = 42,336,000
library = 3,000 × 42,336,000 = 127,008,000,000 bytes = 127.008 GB
| Storage form | Share of uncompressed | Library size |
|---|---|---|
| Uncompressed | 100% | 127.008 GB |
| Lossless (MDN's 40-50%) | 40% to 50% | 50.80 to 63.50 GB |
| Lossy (MDN's 5-20%) | 5% to 20% | 6.35 to 25.40 GB |
Each setting multiplies the result. Example: raising the sample rate to 96,000 per second and the sample size to 3 bytes (24 bits) gives 96,000 × 3 × 2 = 576,000 bytes per second for stereo. That is 3.27 times the 176,400 bytes per second used above, for the same music.
Video: bitrate times time
A compressed video file is sized by its bitrate. MDN states that "higher bit rates inherently lead to larger output files," and that resolution, frame rate and color depth all affect the compressed size. For comparison, MDN works out raw high-definition video at 4 bytes per pixel: 8,294,400 bytes per frame, 248,832,000 bytes per second at 30 frames per second, and 14.93 GB per minute.
Planning from a bitrate is far more practical. At 8 Mbps, one minute is 8,000,000 × 60 ÷ 8 = 60,000,000 bytes, so MDN's raw figure of 14,929,920,000 bytes per minute is 248.8 times larger. Example: 100 hours of video at a total bitrate that includes the sound.
bytes per hour = bitrate × 3,600 ÷ 8
| Total bitrate (example) | Per hour | 100 hours |
|---|---|---|
| 4 Mbps | 1.8 GB | 180 GB |
| 8 Mbps | 3.6 GB | 360 GB |
| 16 Mbps | 7.2 GB | 720 GB |
If your video bitrate excludes the audio track, add the audio bitrate before you multiply. The article on video file size from bitrate works through the same formula for one clip.
Combining the three into one plan
Pick one scenario from each table, add them, then apply growth and copies as in how to plan backup storage space. Revisit the plan when you add a large batch, because a change in any one input moves the total.
| Item | Scenario (example) | Size |
|---|---|---|
| Photos | 20,000 photos at 8 : 1 | 180 GB |
| Music | 3,000 songs, lossless at 50% | 63.504 GB |
| Video | 100 hours at 8 Mbps | 360 GB |
| Library today | Sum | 603.504 GB |
| With growth | × 1.5 (assumed) | 905.256 GB |
| With two backup copies | × 2 (assumed) | 1,810.512 GB |
In binary units, today's library is 603.504 × 1,000,000,000 ÷ 1,073,741,824 = 562.06 GiB. Use one unit family from start to finish, and read GB vs. GiB explained if a label and a readout disagree.
Common mistakes
- Using uncompressed numbers as the stored size. The uncompressed figure is an upper bound. The stored size may be far below that figure, so divide by a measured ratio.
- Borrowing another library's average. Content changes the result. Measure a sample from your own files.
- Leaving out the audio in video. If the bitrate covers only the picture, the sound adds its own bytes.
- Mixing Mbps and MB/s. A bitrate in megabits per second must be divided by 8 to get bytes. See bits vs. bytes.
- Treating a published range as a promise. MDN's 5-20% for lossy audio depends on the complexity of the audio. Use a range to bracket the estimate, then check it against a sample.
- Planning for today only. Libraries grow. Include a growth factor and the number of copies before you pick a capacity.
FAQ
How much storage do I need for photos?
Multiply the number of photos by the stored size of one. Example: 20,000 photos at 9,000,000 bytes each is 180 GB. Measure your own average rather than relying on the example.
How many hours of video fit in 1 TB?
Divide 1 TB by the hourly size. Example: at 8 Mbps an hour is 3.6 GB, so 1,000 GB holds 277.8 hours. A higher bitrate gives fewer hours.
Is lossless audio about half the size of the uncompressed audio?
MDN gives 40-50% as the usual range for lossless algorithms, depending on the audio. Individual files can fall outside that range. For the 127.008 GB example, 40% to 50% brackets the library between 50.80 and 63.50 GB.
Why does my drive show less space than my plan?
Capacity labels are usually decimal, and NIST records the storage-device convention of 1,000,000 bytes to the megabyte. A tool that reports in GiB shows a number about 6.87% lower for the same bytes.
Sources
- MDN Web Docs, Digital audio concepts. Accessed November 6, 2026.
- MDN Web Docs, Web video codec guide. Accessed November 6, 2026.
- MDN Web Docs, Image file type and format guide. Accessed November 6, 2026.
- ISO, ISO 32000-1:2008, Document management - Portable document format - Part 1: PDF 1.7 (authorized copy). Accessed November 6, 2026.
- NIST, Definitions of the SI units: The binary prefixes. Accessed November 6, 2026.



