File size and capacity calculations
How big is a photo, a song or a text file, and how many fit on a memory card? Every calculation follows the same pattern: work out the bits, then convert the units.
The units
1 kibibyte (KiB) = 1024 bytes, 1 MiB = 1024 KiB, 1 GiB = 1024 MiB, 1 TiB = 1024 GiB.
To go down to a smaller unit, multiply. To go up to a bigger unit, divide.
International GCSE also uses the decimal units: 1 kilobyte (kB) = 1000 bytes, 1 MB = 1000 kB, and so on. Read the question carefully to see which it wants.
Three formulas
| File | Size in bits |
|---|---|
| Bitmap image | width (pixels) × height (pixels) × colour depth (bits per pixel) |
| Sound (one channel) | sample rate (samples per second) × bit depth × length (seconds) |
| Text | number of characters × bits per character (usually 8, one byte each) |
Constructing an expression
Example: a 1024 × 768 image with 24-bit colour, in KiB: 1024 * 768 * 24 / 8 / 1024. If you do work it out: 2304 KiB.
A 60-second mono sound sampled 44 100 times a second at 16 bits: 44100 * 16 * 60 / 8 = 5,292,000 bytes.
Capacity questions
Example: how many 3 MiB photos fit on a 2 GiB card? 2 GiB = 2 × 1024 = 2048 MiB. 2048 ÷ 3 = 682.67, so 682 photos.
An image is 400 pixels wide and 300 pixels high with a colour depth of 8 bits. Calculate its size in KiB.
- Bits = 400 × 300 × 8 = 960,000
- Bytes = 960,000 ÷ 8 = 120,000
- KiB = 120,000 ÷ 1024 = 117.19
Answer: 117.19 KiB (about 117 KiB)
Image bits = width × height × colour depth. Sound bits = sample rate × bit depth × seconds. Text bits = characters × 8. Divide by 8 for bytes and by 1024 for each step up (KiB, MiB, GiB).
- Colour depth
- The number of bits used to store the colour of each pixel.
- Sample rate
- The number of sound samples taken per second, in hertz.
- Bit
- A single binary digit, 0 or 1.
- Bit depth
- The number of bits used to store each sound sample.
- Byte
- 8 bits.
- Binary
- Base 2: the number system that uses only the digits 0 and 1.
All GCSE and International GCSE Computer Science key terms and definitions →
Try two quick questions
See if it has sunk in. Answers are marked straight away.
2 more questions
Try each one, then tap to check.
An image is 400 × 300 pixels with a colour depth of 2 bits. What is its size in bytes?
Show the answer
Answer: 30000 bytes
400 × 300 × 2 = 240 000 bits. 240 000 ÷ 8 = 30 000 bytes.
A sound is sampled 6000 times a second with a bit depth of 8 bits for 4 seconds (one channel). What is its size in bytes?
Show the answer
Answer: 24000 bytes
6000 × 8 × 4 = 192 000 bits. 192 000 ÷ 8 = 24 000 bytes.
Check you have got it
Answer 7 quick questions with instant marking. If you get one wrong, GCSE-ready shows you why and gives you another go. It is free, and you do not need an account.
- Pearson Edexcel GCSE Computer Science (1CP2) specification, topic 2.2.2, 2.2.3, 2.3.1
- Pearson Edexcel International GCSE Computer Science (4CP0) specification, topic 3.3.1, 3.3.4
- Pearson Edexcel GCSE Computer Science (1CP2) specification
Checked by the GCSE-ready editorial team, 16 October 2026. Last updated 2 October 2026. Spotted a mistake? Tell us and we will fix it.
What do exam command words like explain and evaluate mean? →