File Chunk Count Calculator
Type the size of a file and the size of one chunk, choose whether a kilobyte is 1,000 or 1,024 bytes, and you get the number of chunks, how many are completely full, the size of the last chunk and the bytes left over after the full chunks. Everything is computed on whole bytes with exact integers, so there is no rounding noise even for very large files. It is useful for splitting an upload, a download or a backup into parts. The page only does the division: nothing is uploaded, and nothing is sent anywhere.
Number of chunks
32
Chunks = ⌈file bytes ÷ chunk bytes⌉ and leftover = file bytes mod chunk bytes, on whole bytes with exact integers. The page does not say which chunk size to use: your own service may set a minimum, a maximum or a limit on the number of parts.
How it works
- Type the size of the file and pick its unit: bytes, KB, MB or GB.
- Choose the base: 1,000 bytes per step (KB, MB, GB) or 1,024 bytes per step (KiB, MiB, GiB).
- Type the size of one chunk and its unit.
- Read the number of chunks, the size of the last chunk and the leftover bytes, then copy the summary.
What people use it for
Splitting an upload into parts
See that 250 MB cut into 8 MB parts gives 32 chunks, the last one holding 2 MB.
Checking a boundary
Confirm that a file of exactly 1,024 bytes in 512-byte chunks gives 2 full chunks and no leftover.
Preparing a backup or a transfer plan
Count the parts of a large archive before choosing a chunk size, and see how many bytes the last part would need to be full.
Questions
- How are the chunks counted?
- Chunks = ⌈file bytes ÷ chunk bytes⌉, the full chunks are ⌊file bytes ÷ chunk bytes⌋ and the leftover is file bytes mod chunk bytes. A file of 1,025 bytes in chunks of 512 bytes gives 3 chunks, the last one holding 1 byte; 1,024 bytes gives 2 chunks and no leftover, the last chunk being a full 512 bytes; an empty file gives 0 chunks. A chunk larger than the file gives 1 chunk that holds the whole file.
- Should I choose 1,000 or 1,024?
- Both exist and the page does not choose for you. With 1,000, a KB is 1,000 bytes, an MB is 1,000,000 bytes and a GB is 1,000,000,000 bytes. With 1,024, a KiB is 1,024 bytes, an MiB is 1,048,576 bytes and a GiB is 1,073,741,824 bytes. The same base is used for the file and for the chunk, and the result is always shown in exact bytes so you can check it.
- Which values are refused?
- Write a plain number such as 1025, 1,025 or 1.5, with up to 40 characters, no minus sign and no exponent. The file size may be 0; the chunk size must be above 0. A value that is not a whole number of bytes, such as 0.5 B, is refused with a message. Anything above 1,000,000,000,000,000,000 bytes, about one exabyte, is also refused, so every figure stays an exact integer.
- Does it say what chunk size I should use?
- No. The right size depends on the service, the network and the storage you use, and some of them set their own minimum, maximum or number of parts. The page only tells you how many parts a chunk size would give. Check the rules of your own service before relying on the result.