A music file is labeled 128 kbps. A video is labeled 5 Mbps. Both numbers answer one question: how much data does a single second of playback use? That number is the bitrate, and it is counted in bits per second.
Once you know a bitrate and a duration, the file size is one multiplication and one division away. This guide defines the units, shows the formula with a worked example, and separates what a bitrate tells you (size) from what it does not (quality on its own).
The unit: bits per second
A bitrate counts bits, not bytes. NIST lists one byte as 8 bits, and its SI prefix table gives kilo as 1,000 and mega as 1,000,000. So 1 kbps is 1,000 bits per second, and 1 Mbps is 1,000,000 bits per second.
| Unit | Written | Bits per second | Bytes per second |
|---|---|---|---|
| bit per second | bit/s | 1 | 0.125 |
| kilobit per second | kbps | 1,000 | 125 |
| megabit per second | Mbps | 1,000,000 | 125,000 |
The capital letters matter. "Mbps" has a small b for bits, while "MB/s" has a capital B for bytes, and the second is eight times larger. The full story is in bits vs. bytes and Mbps vs. MB/s.
Where a bitrate comes from
There are two cases, and they behave differently.
Uncompressed audio has a bitrate that follows from three settings. MDN's audio guide multiplies channels, bits per sample and samples per second to get the bit rate. For CD audio that gives 44,100 × 16 × 2 = 1,411,200 bit/s. Sample rate and bit depth walks through each factor.
Compressed audio and video have a bitrate that the encoder is asked to hit or to average. The setting is yours to choose, and the codec decides how to spend the bits. MDN's codec guides state that a higher bit rate is likely to give a larger file, and that quality generally improves with it. For what a codec does, see what is a codec.
From bitrate to file size
The formula uses seconds, so convert the duration first.
size in bytes = bitrate in bit/s × seconds ÷ 8
Worked example. Example: a 10-minute video at 5 Mbps.
- Bitrate: 5 Mbps = 5,000,000 bit/s.
- Duration: 10 minutes × 60 = 600 seconds.
- Bits: 5,000,000 × 600 = 3,000,000,000 bits.
- Bytes: 3,000,000,000 ÷ 8 = 375,000,000 bytes, or 375 MB.
Add an audio track at 128 kbps and the total bitrate becomes 5,128,000 bit/s. The same steps give 384,600,000 bytes.
Sizes in this guide are decimal: 1 MB is 1,000,000 bytes, as NIST lists it.
Audio works the same way. Example: 3 minutes at 128 kbps is 128,000 × 180 ÷ 8 = 2,880,000 bytes, or 2.88 MB. The video file size calculator applies the formula to a bitrate and a duration. The audio file size calculator starts from sample rate, bit depth and channels and also shows the resulting bitrate. For a longer walk-through, read how to calculate video file size.
What a bitrate tells you and what it leaves out
A bitrate tells you size. A bitrate does not, by itself, tell you how good the result looks or sounds.
| Term | What it measures | Unit |
|---|---|---|
| Bitrate | Data used per second of playback | kbps, Mbps |
| Sample rate | Audio measurements taken per second | Hz |
| Resolution | Pixels in each video frame | pixels |
| Connection speed | Data a network can carry per second | Mbps |
Sample rate and resolution are inputs to how much data a recording holds. Bitrate is the rate of data in the finished stream. Connection speed is a different thing that happens to share the unit. A stream with a 5 Mbps bitrate needs a connection that can carry at least that much, but a faster connection does not raise the stream's bitrate.
MDN's video guide says quality generally improves with bit rate. It also says that most video codecs are lossy and that the amount of loss depends on the codec and how it is configured. Two codecs at the same bitrate produce the same size, and not necessarily the same quality. Use bitrates to compare sizes. Judge quality by looking or listening.
Many streams do not hold a constant rate. The IETF streaming specification RFC 8216 defines an average bit rate and a peak bit rate, and notes that both include container overhead. Constant vs. variable bitrate covers what that means for your estimate.
Going the other way: size to bitrate
If you already have a file, you can recover its average bitrate by reversing the formula.
bitrate in bit/s = size in bytes × 8 ÷ seconds
Example: a 375,000,000-byte file that plays for 600 seconds has an average bitrate of 375,000,000 × 8 ÷ 600 = 5,000,000 bit/s, which is 5 Mbps. The same reversal answers a planning question: how much bitrate can you afford if the file must stay under a size limit? That is the subject of how to choose a bitrate for a target file size.
For a sense of scale, here is one minute of media at a few example bitrates. Each row is the formula applied to 60 seconds, not a measurement of any file.
| Example bitrate | Bytes per minute | Megabytes per minute |
|---|---|---|
| 128 kbps | 960,000 | 0.96 |
| 1,411.2 kbps (CD audio, uncompressed) | 10,584,000 | 10.584 |
| 1 Mbps | 7,500,000 | 7.5 |
| 5 Mbps | 37,500,000 | 37.5 |
Common mistakes
- Reading Mbps as MB/s. A 5 Mbps stream moves 0.625 MB per second, not 5 MB. Divide by 8 to go from bits to bytes.
- Leaving out the audio. A video bitrate often covers the picture only. Add the audio bitrate before you compute a size.
- Using minutes in the formula. The formula needs seconds. Ten minutes is 600, not 10.
- Treating a variable bitrate as fixed. The number you see may be an average or a peak. Use the average for size, as explained in the article linked above.
- Comparing quality across codecs by bitrate alone. Equal bitrates give equal sizes, but different codecs spend those bits differently.
FAQ
Is a higher bitrate always better quality?
Not as a rule. MDN says quality generally improves as the bit rate rises, and the effect varies by codec and settings. What is certain is that a higher bitrate makes a larger file.
What is the difference between kbps and KB/s?
Kbps is kilobits per second and KB/s is kilobytes per second. Divide kbps by 8 to get KB/s: a 128 kbps audio stream is 16 KB/s.
Is bitrate the same as internet speed?
No. Bitrate is how much data the media itself uses each second. Internet speed is how much your connection can carry. A connection has to be at least as fast as the stream's bitrate to keep up, but it does not change that bitrate.
How can I find the bitrate of a file I already have?
Some file-information screens list it. If yours does not, divide the file size in bits by the duration in seconds, as shown above. The result is an average, and it includes everything stored in the file, such as extra audio tracks and metadata.
Sources
- MDN Web Docs, Digital audio concepts. Accessed November 6, 2026.
- MDN Web Docs, Web audio codec guide. Accessed November 6, 2026.
- MDN Web Docs, Web video codec guide. Accessed November 6, 2026.
- NIST, Definitions of the SI units: The binary prefixes. Accessed November 6, 2026.
- NIST, Metric (SI) Prefixes. Accessed November 6, 2026.
- IETF, RFC 8216: HTTP Live Streaming. Accessed November 6, 2026.



