ThisCalculator

Everyday

How to Figure Out File Size in Bytes and Other Units

Updated · Standard formula, shown below

Converted file size 1,048,576.00 selected unit
File size in bytes
1,048,576 B
Result
File size
1048576 B
You entered
Current unit
Bytes
You entered

How to Figure Out File Size in Bytes and Other Units

Use this file size calculator to convert a file’s size from bytes into kilobytes, megabytes, gigabytes, or other units. Enter the size as a number and choose its current unit; the calculator returns the equivalent in bytes and the unit you want. You will need the file’s displayed size or another reliable size value.

Formula

Size in bytes = entered size × bytes per current unit. Then converted size = size in bytes ÷ bytes per target unit.

  • size is the number entered, in the selected current unit.
  • from is the number of bytes in one current unit.
  • to is the number of bytes in one target unit.
  • result is the converted size in the selected target unit.

This calculator uses decimal units where KB = 1,000 bytes, MB = 1,000,000 bytes, and GB = 1,000,000,000 bytes. It also offers binary units: KiB = 1,024 bytes, MiB = 1,048,576 bytes, and GiB = 1,073,741,824 bytes. A byte (B) is the base unit. The calculator’s “bytes” figure is a mathematical conversion of the number entered, not a fresh measurement of the file.

Worked Example

The default values are 1,048,576 B, with the current unit set to Bytes and the target unit set to Bytes. The selected unit factors are both 1 byte.

  1. Convert to bytes: 1,048,576 × 1 = 1,048,576 B.
  2. Convert to the target unit: 1,048,576 ÷ 1 = 1,048,576 B.

The calculator therefore displays 1,048,576.00 B as the converted file size and 1,048,576 B as the byte value.

What You’ll Need

  • The file, or its size as shown in a file manager, upload form, or other source.
  • The displayed unit, such as B, KB, MB, GB, KiB, MiB, or GiB. If the source only says “MB,” check its documentation or settings if you need an exact conversion.
  • A calculator or a basic way to multiply and divide if you are not using the calculator above.

Step-by-Step

  1. Find the file’s displayed size. On a computer, open the folder containing the file. In many file managers, right-click or open the file’s information or properties screen. On a phone, use the file browser’s details or information option. Menus differ by device and operating system. Note whether the value is an exact byte count or a rounded display such as 2.4 MB.
  2. Record the unit exactly as shown. B means bytes. KB, MB, and GB commonly refer to decimal units, but some software uses these labels for powers of 1,024. KiB, MiB, and GiB explicitly indicate binary units. Do not assume two programs use the same convention when their labels are ambiguous.
  3. Enter the number. Type the numeric part into “File size,” without the unit or thousands separators if the input does not accept them. For example, for a display of 2.4 MB, enter 2.4, not “2.4 MB.”
  4. Select the current unit. Choose the unit that belongs to the number you entered. If the source says 2.4 MB, select MB (decimal) only if that interpretation is appropriate. If it says 2.4 MiB, select MiB (binary).
  5. Choose the unit you want. Select the target unit—for example, bytes for a precise comparison, MiB for a binary-based display, or GB for a decimal-based storage figure.
  6. Read the converted result and bytes figure. The first output is the size in your chosen target unit. The second shows the equivalent number of bytes. Use the byte count for comparisons only when the original value was precise enough; a rounded display produces an approximate conversion.
  7. Check the result against the context. A conversion changes how a size is expressed, not the file itself. For example, 1,000,000,000 bytes is 1 GB (decimal), while the same quantity is about 0.93 GiB (binary). A difference between these values is expected.

Common Mistakes

  • Mixing decimal and binary units: 1 MB is 1,000,000 bytes, while 1 MiB is 1,048,576 bytes. Their values are close but not identical.
  • Confusing bits and bytes: A byte is written B; a bit is written b. Network speeds are often stated in bits per second, while file sizes are usually stated in bytes. Eight bits make one byte, so a value in bits must be divided by eight to express it in bytes.
  • Entering the unit twice: Enter only the number in the input and choose the matching unit from the list.
  • Treating a rounded display as exact: If a device shows 1.2 GB, the original size could be a range of values rounded to one decimal place. Converting 1.2 cannot recover the original byte count.
  • Comparing unlike measurements: A file’s logical size may differ from the space it occupies on a drive, due to file-system allocation, compression, or other storage details.

Tips

  • Use bytes when comparing exact file-size values, provided both sources report exact bytes.
  • Keep the original unit alongside a rounded value so you can interpret it later.
  • Use decimal units for calculations or specifications that explicitly define KB, MB, and GB as powers of 1,000; use binary units when the source specifies KiB, MiB, or GiB.
  • For a manual conversion, multiply by the source unit’s byte factor, then divide by the target unit’s byte factor. For example, converting MB to MiB means multiplying by 1,000,000 and dividing by 1,048,576.
  • For a folder, check whether the displayed total includes hidden files and subfolders. A folder’s reported size can depend on the tool and settings.

Troubleshooting

The result seems much too large or small: Check that the input number and current unit match. A value of 500 MB entered as 500 bytes will be far smaller than intended. Also check whether the source means MB or MiB.

The calculator will not accept the input: Enter a nonnegative number only. Remove unit letters, commas, and extra spaces; use a decimal point for fractional values if needed.

Your converted number differs from another tool: Compare the unit definitions and rounding. One tool may use decimal units and another binary units, or one may round its display. Compare exact byte counts if available.

The file’s properties and used disk space disagree: Check whether one figure is “size” and the other is “size on disk.” These describe different things. For a folder, verify that the same files and hidden items are included in both measurements.

You only know a rounded value: You can convert it as an estimate, but cannot calculate an exact byte count from it. Return to the original file or source and look for a more precise details view.

Frequently Asked Questions

How do I find a file’s size?
Open the file’s details or properties in your device’s file manager. The exact menu name and location vary by operating system.

How many bytes are in a kilobyte?
In decimal usage, 1 KB = 1,000 bytes. The binary unit is 1 KiB = 1,024 bytes.

Is MB bigger than MiB?
Yes, slightly: 1 MB is 1,000,000 bytes, while 1 MiB is 1,048,576 bytes.

Why does my computer show a different file size than a website?
The two may use different unit conventions, rounding, or measurement methods. Check the labels and compare exact byte values if available.

Does converting a file size change the file?
No. Conversion only expresses the same size in another unit; it does not compress, resize, or modify the file.

Can I get an exact size from a rounded MB value?
No. A rounded value represents an interval of possible sizes. You need the original byte count or a more precise measurement for an exact result.

Related

Formula used
in size | File size | B | 1048576 | 0
sel from | Current unit | Bytes=1, KB (decimal)=1000, MB (decimal)=1000000, GB (decimal)=1000000000, KiB (binary)=1024, MiB (binary)=1048576, GiB (binary)=1073741824
sel to | Convert to | Bytes=1, KB (decimal)=1000, MB (decimal)=1000000, GB (decimal)=1000000000, KiB (binary)=1024, MiB (binary)=1048576, GiB (binary)=1073741824
out result | Converted file size | selected unit | size * from / to | 2
out bytes | File size in bytes | B | size * from | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.