If you’re considering buying an MP3 player, or are just wondering how much of your music collection will fit on to one, then this little utility could be just what you’re looking for.
The memory, or storage capacity, of an MP3 player is usually measured in GB (Giga Bytes), or MB (Mega Bytes) for the smaller/older players. However, the number of songs that your MP3 player can potentially store is not only determined by its memory capacity, but also by the bit rate of your MP3 tracks.
If you’re not sure of what a bit rate is, or what it has to do with things, then the previous article on What are bit rates? may help explain things for you.
If you’ve already got a collection of music in MP3 format (or one of the other popular music compression formats such as WMA or AAC), then your bit rates have already been set. However, when you’re converting your music from CD to MP3 (ripping as it’s called), you should be able to choose the bit rate most suitable to your requirements from within your chosen conversion software. 128 kbps is usually a good starting point as a compromise between sound quality and storage requirements.
MP3 Song Capacity Calculator
Assumptions
The MP3 Song Capacity Calculator makes a few assumptions for its calculations. As such the quoted results are only approximations and may vary from actual results. The key assumptions are:
- Average album length is 45 minutes
- Average song length is 3 minutes 30 seconds
- All MP3 track data is 100% audio
- All of the MP3 player’s memory can be utilised
If you’d like to use this calculator on your own website, please feel free to do so. All I ask is that you put a link next to the calculator crediting me and linking back to this web page.
The JavaScript for this and the following storage capacity calculator is:
1: // Define average album/song length and artwork size
2: var SECONDS_PER_ALBUM = 2700; // in seconds = 45 mins
3: var SECONDS_PER_SONG = 210; // in seconds = 3:30 mins
4: var ALBUM_COVER_STORAGE = 51200; // in bytes = 50kB in bytes
5:
6:
7: // MP3 song space calculation
8: function CalcSongs()
9: {
10: // Get key variables from HTML form
11: intMemory = document.getElementById("memory").value;
12: intBitrate = document.getElementById("bitrate").value;
13:
14: // Calculate total time available in seconds for given memory and bitrate
15: intTotalTime = (intMemory * 8) / intBitrate;
16:
17: // Convert total time in seconds to hours and minutes
18: intHours = Math.floor(intTotalTime / 3600);
19: intMins = Math.floor((intTotalTime - (intHours * 3600)) / 60);
20:
21: // Estimate how many songs and albums can be stored
22: intAlbums = (intTotalTime / SECONDS_PER_ALBUM);
23: intSongs = Math.floor(intTotalTime / SECONDS_PER_SONG);
24:
25: // Show results on web page in allocated fields
26: document.getElementById("hours").value = intHours + ':' + intMins;
27: document.getElementById("albums").value = intAlbums.toFixed(1);
28: document.getElementById("songs").value = intSongs;
29: }
30:
31:
32: // MP3 storage space calculation
33: function CalcStorage()
34: {
35: // Get key variables from HTML form
36: intAlbums = document.getElementById("albums2").value;
37: intBitrate = document.getElementById("bitrate2").value;
38:
39: // Calculate total time for all albums
40: intTotalTime = intAlbums * SECONDS_PER_ALBUM;
41:
42: // Estimate how much storage is required for audio in M
43: intStorage = intTotalTime * (intBitrate / 8);
44:
45: // Estimate how much storage is required for one artwork per album
46: intArtStorage = intAlbums * ALBUM_COVER_STORAGE;
47:
48: // Estimate total storage
49: intStorage = intStorage + intArtStorage;
50:
51: // Work out multplier: k, M, G
52: if (intStorage > 1073741823)
53: intStorage = Math.floor(intStorage / 1073741824) + 'G';
54: else if (intStorage > 1048575)
55: intStorage = Math.floor(intStorage / 1048576) + 'M';
56: else if (intStorage > 1023)
57: intStorage = Math.floor(intStorage / 1024) + 'k';
58:
59: // Show results on web page in allocated fields
60: document.getElementById("storage").value = intStorage + 'B';
61: }
Download this file: song-calc.js [2.4kB]
MP3 Storage Capacity Calculator
This simple little calculator estimates how much space will be required to store your CD collection on your computer’s hard disc or portable music player based on a given bit rate:
Assumptions
The above MP3 Storage Capacity Calculator makes a few assumptions for its calculations. As such the results are only approximations. The key assumptions are:
- Average album length is 45 minutes
- A single piece of album artwork is added to each album at 50kB
The HTML code for the two calculators is:
1: <script type="text/javascript" src="song-calc.js"></script>
2:
3: <form id="mp3calc" method="post">
4: <fieldset>
5: <legend>MP3 Song Capacity Calculator</legend>
6:
7: <table border="0" summary="JavaScript MP3 Song Capacity Calculator">
8: <tbody>
9:
10: <tr>
11: <td align="left"><label for="memory"><strong>Player Memory Capacity: </strong></label></td>
12:
13: <td align="left">
14: <select id="memory" onchange="return CalcSongs();" name="memory">
15: <option value="134217728">128 MB</option>
16: <option value="268435456">256 MB</option>
17: <option value="536870912">512 MB</option>
18: <option value="1073741824">1 GB</option>
19: <option value="2147483648">2 GB</option>
20: <option value="4294967296">4 GB</option>
21: <option value="8589934592">8 GB</option>
22: <option value="17179869184">16 GB</option>
23: <option value="21474836480">20 GB</option>
24: <option value="32212254720">30 GB</option>
25: <option value="34359738368">32 GB</option>
26: <option value="42949672960">40 GB</option>
27: <option value="64424509440">60 GB</option>
28: <option value="85899345920">80 GB</option>
29: </select>
30: </td>
31: </tr>
32:
33: <tr>
34: <td align="left"><label for="bitrate"><strong>Bit Rate of Songs: </strong></label></td>
35: <td align="left">
36: <select id="bitrate" name="bitrate" onchange="return CalcSongs();">
37: <option value="8000">8 kbps</option>
38: <option value="16000">16 kbps</option>
39: <option value="24000">24 kbps</option>
40: <option value="32000">32 kbps</option>
41: <option value="40000">40 kbps</option>
42: <option value="48000">48 kbps</option>
43: <option value="56000">56 kbps</option>
44: <option value="64000">64 kbps</option>
45: <option value="80000">80 kbps</option>
46: <option value="96000">96 kbps</option>
47: <option value="112000">112 kbps</option>
48: <option selected="selected" value="128000">128 kbps</option>
49: <option value="144000">144 kbps</option>
50: <option value="160000">160 kbps</option>
51: <option value="192000">192 kbps</option>
52: <option value="224000">224 kbps</option>
53: <option value="256000">256 kbps</option>
54: <option value="320000">320 kbps</option>
55: </select>
56: </td>
57: </tr>
58:
59: <tr>
60: <td align="left"><label for="hours"><strong>Hours of Music: </strong></label></td>
61: <td align="left"><input id="hours" disabled="disabled" name="hours" size="8" type="text" value="2:19" /></td>
62: </tr>
63:
64: <tr>
65: <td align="left"><label for="albums"><strong>Typical No. Albums: </strong></label></td>
66: <td align="left"><input id="albums" disabled="disabled" name="albums" size="8" type="text" value="3.1" /> 45 mins/album</td>
67: </tr>
68:
69: <tr>
70: <td align="left"><label for="songs"><strong>Typical No. Songs: </strong></label></td>
71: <td align="left"><input id="songs" disabled="disabled" name="songs" size="8" type="text" value="39" /> 3:30 mins/song</td>
72: </tr>
73:
74: </tbody>
75: </table>
76: </fieldset>
77: </form>
78:
79: <form id="mp3calc2" method="post">
80: <fieldset>
81: <legend>MP3 Storage Capacity Calculator</legend>
82:
83: <table border="0" summary="JavaScript MP3 Storage Capacity Calculator">
84: <tbody>
85:
86: <tr>
87: <td align="left"><label for="albums2"><strong>No. Albums: </strong></label></td>
88: <td align="left">
89: <input id="albums2" name="albums2" size="8" type="text" value="100" onchange="return CalcStorage();" /> at 45 mins/album
90: </td>
91: </tr>
92:
93: <tr>
94: <td align="left"><label for="bitrate2"><strong>Bit Rate of Songs: </strong></label></td>
95: <td align="left">
96: <select id="bitrate2" name="bitrate2" onchange="return CalcStorage();">
97: <option value="8000">8 kbps</option>
98: <option value="16000">16 kbps</option>
99: <option value="24000">24 kbps</option>
100: <option value="32000">32 kbps</option>
101: <option value="40000">40 kbps</option>
102: <option value="48000">48 kbps</option>
103: <option value="56000">56 kbps</option>
104: <option value="64000">64 kbps</option>
105: <option value="80000">80 kbps</option>
106: <option value="96000">96 kbps</option>
107: <option value="112000">112 kbps</option>
108: <option selected="selected" value="128000">128 kbps</option>
109: <option value="144000">144 kbps</option>
110: <option value="160000">160 kbps</option>
111: <option value="192000">192 kbps</option>
112: <option value="224000">224 kbps</option>
113: <option value="256000">256 kbps</option>
114: <option value="320000">320 kbps</option>
115: </select>
116: </td>
117: </tr>
118:
119: <tr>
120: <td align="left"><label for="storage"><strong>Storage Required: </strong></label></td>
121: <td align="left"><input id="storage" disabled="disabled" name="storage" size="8" type="text" value="4GB" /></td>
122: </tr>
123:
124: </tbody>
125: </table>
126: </fieldset>
127: </form>
Download this file: mp3.htm [6.6kB]
James commented
Dear Richard
Handy page – or so I thought until I noticed the bug…
Looks like for a given bitrate choice, the same values for Hours of Music: etc are calculated for both 4GB and 8GB capacity. Just a copy/paste typo I think:
4 GB 8 GB
in line 133 of your html source.
The 16GB entry is OK – haven’t checked the rest!
Nearly put me off the 8GB player I was looking at til I realised that the 16GB looked like 4 times the size!!!
Cheers, James
Richard commented
James: Thanks for pointing out the school boy error. Hopefully I’ve fixed it now and it’s back to being a “handy page” again. If you’d like to try it again, let me know if you find any other deliberate mistakes. 🙂
Kylie commented
Hi Richard,
Great little item you have here, just wondering if i could get the code off you to place on my upcomming website. Happy to have links on it back to your blog =)
hugo commented
richard, exellent site, clear even to thickies like me, best wishes for a quick recovery
hugo
Oskar commented
Great Article!
If I could write like this I would be well chuffed 😉
The more I read articles of such quality as this (which is rare), the more I think there might be a future for the Web. Keep it up, as it were.
Deni commented
Is the 128 bit rate optimum for audiobooks? Our library system has a lot of MP3 CDs and I”m trying to get by on the less expensive Sansa Clip+.
Richard commented
128kbps for audio books should be perfectly sufficient and give you quite good quality.
Kris commented
Ha ha, when there are three little toddlers running around in the house while you listening to your tiny cheap Chinese BT mobile loud speaker.
RICHARD S. RUSK commented
i highy think that i-pods should have more with come in the packet when you buy it.
Blake commented
This is a great tool; thank you for offering such a clean and straightforward calculator.
Would you perhaps consider adding the v0 bitrate as well as an option for lossless formats such as FLAC?
Cheers & happy holidays
Richard commented
Hi Blake,
Glad you liked the tool. With fixed bit rates it’s fairly straightforward to predict resulting file sizes, unfortunately with variable bit rates like V0 (highest quality variable bit rate on the LAME MP3 encoder) the bit rate varies depending on the source material making impossible to predict the final outcome. Similarly with FLAC, compression ratios can vary anywhere from 30 to 50% dependent on the track. It’s like trying to hit a moving target!
Gonzo commented
Hi Richard. Interesting info here. I hope you can answer some questions.
I have an 8GB ipod Touch (Actually, it’s 6.8gb). I did NOT convert higher bit rate songs to 128kbps to AAC. Therefore, my iPod can only hold about 700 songs plus half a gb of podcasts.
Since they are NOT at 128 kbps, can I assume they are at 256 or 320 kbps? If I convert the songs to 128 kbps, will that allow me to add more songs?
If yes to the questions above, how do I convert the songs to 128 kbps? Do I need to delete them from iTunes and load them again?
Thanks for your time.
RICHARD S. RUSK commented
Do you think that we could talk on the i-pods Gonzo?
Richard commented
Hi Gonzo,
I’m afraid that I’m one of those rare creatures who doesn’t have an iPod, or use iTunes, so I don’t know how much help I can be. However, if your songs are encoded at a higher bit rate, then encoding them at a lower bit rate will definitely allow you to store more songs on your iPod. It’s probably best to reload/encode songs again from scratch. If you re-encode a 256kbps song to 128kbps song the audio quality will be worse than encoding the original track straight to 128kbps. If you can manage to find out what your existing tracks are encoded at, that would be a good start. I certainly wouldn’t go below 128kbps for your music though.
I hope this goes some way to answering your question. Sorry I can’t be more specific, but I don’t really have a working knowledge of the Apple stuff.
mido commented
Anny is given a new MP3 player for her birthday which contains 4GB of storage. Anny has a collection of 400 CDs.
(a) Calculate how many CDs can she fit onto her MP3 player.
You may assume that each CD lasts for 60 minutes, and is recorded with standard parameters for CD-quality stereo sound. You may also assume that each minute of sound stored in MP3 format takes 1MB.
Richard commented
…back to school: 4GB = 4,000MB. 4,000MB = 4,000 minutes (assuming 1MB = 1 minute). Therefore number CDs = 4,000 minutes divided by 60 (minutes per CD) = 66.6 = 66 Whole CDs given your above conditions.
mido commented
thanks alot now i got it … 🙂
Anonimus commented
It sounds good, but there are 1024 MB in 1GB. Also, overall this website was awesome.
Richard Farrar commented
Thanks, but I believe I have used 1024MB in 1GB in my code.
RGH commented
Thanks for the conversion information, Richard. I’ve been “googleing” for about an hour trying to figure if I should buy a 2GB, 4GB, or 8GB MP3 player for some of my classical music that I listen to in my car, and your site was the first that answered my question. Many, many thanks.
Richard commented
So pleased to of been assistance after your long search. I hope your purchase works out for you.
HWC commented
This page is definite bookmark. Thanks!
Richard commented
Thanks, glad you found it useful.
Ed commented
So, your tool is really handy, I appreciate the effort you put into this. On another note, why are people asking you how big their library is and how many CDs fit in how much space.
@ mido “Average album length is 45 minutes” . You just gave the equation in a word problem and the variable was given above. Think a little, it will not hurt you.
@ RGH right click on the damn folder then click properties, it’ll tell you the size…..
Richard, You are a very patient person, thanks again for your scripting work. Please delete this to avoid a cascade on your blog.
Richard commented
Thanks for your kind comments Ed, I get a lot out of the web and other people’s efforts, so this is my way of giving a little back into the system.
gm commented
Hi Richard
Hope to help me about a problem.
The capacity of a song in mp3 is 4minutes and 30 seconds. Download spees is 56kpbs. How much time is needed to download this song and what is the capacity of her
Richard commented
Hi, This all depends on what bit rate the MP3 was recorded at, do you have this information to hand?
gm commented
if you can help me with those information??
100–160 kbit/s – Standard Bitrate quality;
192 kbit/s is the highest level supported by most MP3
224–320 kbit/s – VBR to highest MP3 quality
Richard commented
Hope this answers your questions:
4 min 30 sec = (4 x 60) + 30 = 270 seconds
File Sizes:
@128kbps = 128,000 x 270 = 34,560,000 bits = 4MB (8 bits per byte)
@192kbps = 192,000 x 270 = 51,840,000 bits = 6MB
@320kbps = 320,000 x 270 = 86,400,000 bits = 10MB
Download Times @ 56kbps:
34,560,000 / 56, 000 = 617 seconds = 10 min 17 sec
51,840,000 / 56, 000 = 925 seconds = 15 min 25 sec
86,400,000 / 56, 000 = 1,542 seconds = 25 min 43 sec
gm commented
File Sizes:
@128kbps = 128,000 x 270 = 34,560,000 bits = 4MB (8 bits per byte)
Download Times @ 56kbps:
34,560,000 / 56, 000 = 617 seconds = 10 min 17 sec
this is good
thnx man 🙂
Richard commented
You’re welcome, glad to be of assistance.
gm commented
Hi Richard,
Could you help me about Computer Networking.
I have to do a project on this subject which has to do Developing the chat with multicast, this project should realize the program c #. While my colleagues in other group have to Develop client program that communicate with the server in C #. NET UDP. In the end I need to link the chat with my colleague’s server.
best regards
Richard Farrar commented
Hi, Unfortunately this one is a little out of my depth; my networking programming experience is quite limited. Time to try Google search perhaps? Good luck with your project.
Brendan commented
Since everyone is so happy with this calculator, I must be missing something. I’ve tried the MP3 Song Calculator on this page in both chrome and firefox and the resultant greyed out firgures never change whether I use the smallest or the greatest bit rate or change the storage. It is always 2.19, 3.1, 39.
What have I missed? I was looking for a ‘submit’ or ‘calculate’ button but could not see one on the form so I assumed it would automatically recalculate on a change to the bit rate or storage capacity. But no change?????
Richard Farrar commented
Hi Brendan, You hadn’t missed anything. Unfortunately a WordPress update seemed to have knocked out the Javascript. I think I’ve fixed it now if you’d like to give it another go. Thanks for bringing this to my attention. Richard
Brendan commented
That’s working fine now Richard thanks. I was considering buying a sony voice recorder to record a three day convention. Because it had only internal memory of 2GB, I was keen to see if I could record the whole event without having to ’empty’ it to a computer. It is set to record at 192 kbps so using your calculator I see it will definitely cover 24 hours at that rate. – thanks –
and thanks for the speedy reply too.
Richard Farrar commented
You are most welcome, glad to be of assistance.
meir commented
Very good information.
StoneyCreeker commented
Thank You Richard!
I added entries for 650MB and 700MB to show how many minutes would fit on a cd and 4.7GB for a DVD.
I just inserted:
650 MB
700 MB
4.7GB
It seems to be working.
Would this be correct?
Thank You.
StoneyCreeker commented
Sorry, It cut out my code…
<option value=”681574400″>650 MB</option>
Thanks
Richard Farrar commented
I’ve just had a look at your website and your code is spot on. I might update my code to add these common sizes too!
Thanks for the link.
bob bright commented
thank you so much for the link, great detail for the numbers and i might update mine too
Gary Evans commented
Nice site – thanks for doing this. I’m moving from a 500MB unit to a 8GB Sansa ordered from B&H. I will have to see if the sound sacrifice (128kbps vs 250kbps) is worth being able to store 1/2 (or double, depending on how you look at it) the number of CDs.
Richard Farrar commented
Thanks Gary. For a device with 8GB my advice would be to go for the 250kbps if you can afford the additional space it takes up.
Gordon Couling commented
Hello Richard
I have just bought a 16GB Sony Walkman and put three of my CD’s into it to get familier with it. When I put another one in next day my first three had disapeared. What have I done wrong. Also the Walkman had music in when I bought it. This is still there. I have about 200 CD’s so I cannot down load them all at once.
Thank you
Gordon Coulling
Richard Farrar commented
Hi Gordon,
How did you transfer your music from your computer to your Walkman, using something like Windows Media Player or iTunes, or dragging and copying the files directly yourself from a folder on your PC to a music folder on your Walkman?
Your 200 CDs should fit on a 16GB Walkman, although they will take a while to rip to MP3, or whatever format you’re using.
Ken Robson commented
Hi Richard
Excellent site, just what I’ve been looking for, thank you.
On a slightly different tack, I am just starting to rip all my CDs on my laptop to Flac initially. Does the quality of my cd drive and/or sound card affect the quality of the rip, or as it is all digital does it not matter?
Thanks again & merry Christmas
Richard Farrar commented
Hi Ken,
Glad you liked my site, thanks very much.
Regarding your question, the sound card shouldn’t make a difference as the ripping should all be happening in the digital domain. However, the CD drive could potentially. Have a read of this article on CD players and issues such as jitter: http://www.stereophile.com/reference/590jitter/
Hope you have a wonderful Christmas.
Michael Bryner commented
Most songs are averaged 4 minutes not 3 and half. Now a days they are even bigger than 4 minutes. So this is inaccurate. I listen to metal, metalcore, deathcore, death metal, and some songs are a half hour long. So really best way to average it out is in between that time. So I say around more of 6 minutes average, since only one or two songs are 30 minutes long.
Richard Farrar commented
Hi Michael, An interesting point particularly with your genre of music that has some very long tracks which would skew the average. Songs might also be getting longer than they used to be. It all comes down to an individual’s music collection and perhaps the genre of music they listen to and the era in which it was produced. Sample size is quite important too, how many songs to take the average of; more is obviously better. So, for the moment as an approximation across the board I’m happy to stick with 3 minutes 30 seconds.
sereno commented
Thanks!! Super useful tool and didn’t feel like figuring out the math myself. haha
Richard Farrar commented
You’re welcome, glad it helped.
Canuck commented
Very hand calculator! Thanks Richard!
Interestingly, Nimbus Data put a 100TB SSD on the market a couple of years ago. If I’m correct, with that single drive you could listen to 128 kbps songs for about 212 years and never hear the same song twice!
Richard Farrar commented
Thanks, glad you liked it.
100TB for your music would be a bit bonkers wouldn’t it. 🙂