“My answer is eight times too big or too small.” “Is a kilobyte 1024 or 1000 bytes this time?” — Data-size problems come down to three steps: apply the formula to get bits, divide by 8 to get bytes, then divide by 1024 (or 1000) to get KB or MB.
This article shows how to compute the size of images, audio and video, and transfer time, with worked examples. It also covers the 1024-versus-1000 conventions, common mistakes and a free tool for checking answers.
Data size in three steps
The formulas all give the raw result in bits.
| Type | Formula | Notes on the variables |
|---|---|---|
| Image | width in pixels × height in pixels × colour depth | colour depth = bits per pixel |
| Audio | sampling rate × bit depth × channels × time | use time in seconds |
| Video | size of one frame × frame rate × time | one frame uses the image formula |
| Transfer time | data size (bits) ÷ effective speed (bits/s) | effective speed = line speed × efficiency |
Then divide by 8 for bytes and by 1024 (or 1000) for KB and MB. The 1024-versus-1000 choice is the main source of confusion.
| Prefix | 1024-based (binary) | 1000-based (SI) |
|---|---|---|
| K | 1 KB = 1024 B | 1 kB = 1000 B |
| M | 1 MB = 1,048,576 B (1024²) | 1 MB = 1,000,000 B (10⁶) |
| G | 1 GB = 1,073,741,824 B (1024³) | 1 GB = 1,000,000,000 B (10⁹) |
Follow the convention stated in the question: standards write 1024-based units as KiB and MiB to keep them apart from kB and MB. School problems often use 1KB = 1024B for data sizes while bit rates use 10⁶, so mixing them causes errors. This article and the tool show both values.
Image size: width × height × colour depth
Take a 1024 × 768 pixel, 24-bit full-colour (uncompressed) image.
- Bits: 1024 × 768 × 24 = 18,874,368 bits
- Bytes: 18,874,368 ÷ 8 = 2,359,296 B
- KB/MB: 1024-based gives 2,359,296 ÷ 1024 ÷ 1024 = 2.25 MB; 1000-based gives 2,359,296 ÷ 1,000,000 = 2.359 MB
24-bit full colour stores red, green and blue in 8 bits each, so one pixel is three bytes.
Audio size: sampling rate × bit depth × channels × time
Audio is digitised by slicing the wave at fixed intervals: slices per second is the sampling rate, the precision of each value is the bit depth, and the channel count is 1 for mono or 2 for stereo.
For 44,100 Hz, 16-bit, stereo, 300 seconds (5 minutes):
- Bits: 44,100 × 16 × 2 × 300 = 423,360,000 bits
- Bytes: 423,360,000 ÷ 8 = 52,920,000 B
- 1024-based: 50.47 MB; 1000-based: 52.92 MB
Raising the sampling rate or bit depth increases the size in proportion. An audio CD (44.1 kHz, 16-bit stereo) gives about 50 MB for five minutes; MP3 and AAC make it much smaller.
Video size: one frame × frame rate × time
Video is a sequence of still images: compute one frame, then multiply by the frame rate and duration.
For 512 × 256 pixels, 24-bit colour, 24 fps, 15 seconds:
- One frame: 512 × 256 × 24 = 3,145,728 bits
- Whole clip: 3,145,728 × 24 × 15 = 1,132,462,080 bits
- Bytes: 1,132,462,080 ÷ 8 = 141,557,760 B
- 1024-based: 135 MB; 1000-based: 141.6 MB
The frame rate is the number of images per second: 24 fps means 24 frames each second, and 30 or 60 fps increases the data size in proportion.
Transfer time: data size ÷ effective speed
Transfer time is data size in bits divided by the effective speed; the effective speed is line speed × efficiency.
For 12 MB (1000-based) over a 1.5 Mbps line at 50% efficiency:
- Convert to bits: 12 × 1,000,000 × 8 = 96,000,000 bits
- Effective speed: 1.5 × 1,000,000 × 0.5 = 750,000 bits/s
- Transfer time: 96,000,000 ÷ 750,000 = 128 seconds
The result is theoretical: real transfers add protocol headers, retransmissions and congestion, so measured times are longer. Exam problems represent this gap as the transfer efficiency.
Common mistakes
- Leaving time in minutes: convert 5 minutes to 300 seconds first.
- Confusing bits and bytes: the formula gives bits; forgetting to divide by 8 makes the answer eight times too large.
- Mixing 1024- and 1000-based units: data sizes often use 1024-based units while bit rates use 10⁶. Align the units before dividing.
- Forgetting the transfer efficiency: the effective speed is line speed × efficiency; 50% means half the speed.
- Ignoring the audio track: the video formula covers the picture only; compute audio separately and add it.
Check your answer with the tool
The Tools Hub data-size and transfer-time calculator reproduces the examples above.
Choose "Image data size"
Open the calculator and select "Image data size" (the default).
Enter the values
Enter 1024 for width, 768 for height and 24 for colour depth.
Read the conversions and working
Press Calculate to see "2.25 MB (1024-based) / 2.359 MB (1000-based)" with the working (18,874,368 bits → 2,359,296 B → 2.25 MB).
Tool mentioned in this article
Data Size & Transfer Time Calculator
Image, audio, video and transfer time with both 1024- and 1000-based conversions. Free, in your browser.
For a conversion table of KB, MB, GB and TB, see data size units explained; for rounding the digits of a result, the significant figures tool is handy.
Summary
- Data size follows formula → bits → ÷8 for bytes → ÷1024 (or 1000) for KB and MB
- Image = width × height × depth; audio = sampling rate × bit depth × channels × time; video = one frame × fps × time
- Use the 1024-based or 1000-based rule stated in the question
- Transfer time = data size ÷ effective speed, and effective speed = line speed × efficiency
- Check three things: time in seconds, the division by 8, and the efficiency factor
Write the bits first and convert one step at a time.
FAQ
Should I use 1024-based or 1000-based units?
Follow the question: data sizes often use 1024-based units while bit rates use 10⁶. The tool shows both, so read the one specified.
How do I find the compressed size?
The formulas give uncompressed sizes. If a compression ratio is given, multiply by it: 10 MB at 20% becomes 2 MB.
Why does the calculated transfer time not match reality?
The result is theoretical; real transfers add headers, retransmissions and congestion, so they take longer. Exam problems call this the transfer efficiency.
Does the video size include audio?
The video formula covers the picture only; compute audio separately and add it.