File size is the amount of data in a file, counted in bytes. One byte is made of 8 bits. A metadata report shows File Size with a unit, for example 55 kB for a file of 55,366 bytes.
File size is not the same as image size. Image size counts the pixels in a picture. File size counts every byte in the file.
Where the value comes from
File Size is usually not a field inside the file. The file system keeps the size of each file, together with its file name and its modification date.
The metadata reader ExifTool reads File Size from the file system and lists it in its System group. ExifTool marks File Size as a value that you cannot write or edit.
A few formats also store a size inside the file. A WebP image starts with a header that stores the file size in bytes. That number does not count the first 8 bytes, so it is 8 less than the full file size.
What the value looks like
The raw value of File Size is a whole number of bytes, such as 55366. For display, ExifTool uses SI units by default, where 1 kB is 1,000 bytes. A file below 2,000 bytes is shown in bytes, and larger files are shown in kB, MB, or GB.
The ffprobe program from the FFmpeg project reports the size of a video or audio file as size, in bytes. In its default output format, ffprobe shows N/A when it cannot measure the size. The JSON and XML output formats leave the size out instead.
Why 1 kB can mean 1,000 or 1,024 bytes
There are 2 ways to count larger units of data. SI prefixes such as kilo and mega count in steps of 1,000. Binary prefixes count in steps of 1,024, which is 2 to the power of 10.
In December 1998, the International Electrotechnical Commission (IEC) approved names for binary prefixes. Examples are kibi (Ki), mebi (Mi), and gibi (Gi). Some programs still write KB, MB, or GB when they count in steps of 1,024.
- 1 kilobyte (kB) is 1,000 bytes, and 1 kibibyte (KiB) is 1,024 bytes.
- 1 megabyte (MB) is 1,000,000 bytes, and 1 mebibyte (MiB) is 1,048,576 bytes.
- 1 gigabyte (GB) is 1,000,000,000 bytes, and 1 gibibyte (GiB) is 1,073,741,824 bytes.
- 1 terabyte (TB) is 1,000,000,000,000 bytes, and 1 tebibyte (TiB) is 1,099,511,627,776 bytes.
So the same file can show 2 different numbers. A file of 55,366 bytes is about 55 kB in SI units and about 54 KiB in binary units.
File size and size on disk
A file system gives space to files in blocks called clusters, or allocation units. When a file grows, the file system adds space in whole clusters. So the space a file uses on a disk is often a little larger than its file size.
Windows shows both numbers in the file properties, as Size and Size on disk. The cluster size is set when a drive is formatted and usually depends on the size of the drive. A file can take different space on a USB stick and a hard drive, but its file size stays the same.
Why it matters
File size can decide where you can store a file. A drive with the FAT32 file system holds files of up to 4 GiB each. NTFS and exFAT allow much larger files.
For audio and video files, file size is linked to the bit rate and the duration. FFmpeg calculates the overall bit rate as the file size in bytes, times 8, divided by the duration in seconds.