Song Capacity Calculator for MP3 Players

MP3 PlayerIf 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

MP3 Song Capacity Calculator
45 mins/album
3:30 mins/song


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
 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;
 14:     // Calculate total time available in seconds for given memory and bitrate
 15:     intTotalTime = (intMemory * 8) / intBitrate;
 17:     // Convert total time in seconds to hours and minutes
 18:     intHours = Math.floor(intTotalTime / 3600);
 19:     intMins = Math.floor((intTotalTime - (intHours * 3600)) / 60);
 21:     // Estimate how many songs and albums can be stored
 22:     intAlbums = (intTotalTime / SECONDS_PER_ALBUM);
 23:     intSongs = Math.floor(intTotalTime / SECONDS_PER_SONG);
 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: }
 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;
 39:     // Calculate total time for all albums
 40:     intTotalTime = intAlbums * SECONDS_PER_ALBUM;
 42:     // Estimate how much storage is required for audio in M
 43:     intStorage = intTotalTime * (intBitrate / 8);
 45:     // Estimate how much storage is required for one artwork per album
 46:     intArtStorage = intAlbums * ALBUM_COVER_STORAGE;
 48:     // Estimate total storage
 49:     intStorage = intStorage + intArtStorage;
 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';
 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:

MP3 Storage Capacity Calculator
at 45 mins/album


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>
 3: <form id="mp3calc" method="post">
 4:     <fieldset>
 5:         <legend>MP3 Song Capacity Calculator</legend>
 7:         <table border="0" summary="JavaScript MP3 Song Capacity Calculator">
 8:             <tbody>
 10:                 <tr>
 11:                     <td align="left"><label for="memory"><strong>Player Memory Capacity: </strong></label></td>
 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>
 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>
 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>
 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>
 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>
 74:             </tbody>
 75:         </table>
 76:     </fieldset>
 77: </form>
 79: <form id="mp3calc2" method="post">
 80:     <fieldset>
 81:         <legend>MP3 Storage Capacity Calculator</legend>
 83:         <table border="0" summary="JavaScript MP3 Storage Capacity Calculator">
 84:             <tbody>
 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>
 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>
 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>
 124:             </tbody>
 125:         </table>
 126:     </fieldset>
 127: </form>

Download this file: mp3.htm [6.6kB]

Share this Page!

Subscribe to Get the Latest Posts

Subscribe for free to get my latest blog posts delivered directly to your email inbox.


  1. 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

  2. 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. :-)

  3. 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 =)

  4. hugo commented

    richard, exellent site, clear even to thickies like me, best wishes for a quick recovery

  5. 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.

  6. 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+.

  7. 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

    • 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!

  8. 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.

    • 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.

  9. 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.

  10. 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.

  11. 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.

    • 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.

  12. 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

  13. 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

    • 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

  14. 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 :)

  15. 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

    • 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.

  16. 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?????

    • 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

  17. 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.

  18. 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

    It seems to be working.
    Would this be correct?

    Thank You.

  19. bob bright commented

    thank you so much for the link, great detail for the numbers and i might update mine too

  20. 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.

  21. 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

    • 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.

  22. 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

Leave a Reply

Your email address will not be published. Required fields are marked *