Tar Archive Size Calculator
Work out tar archive size instantly with clear inputs, formula shown and shareable results.
About Tar Archive Size Calculator
tar writes a 512-byte header per file and pads every file's data up to a block boundary, then appends two zero blocks at the end. For many small files that overhead is substantial — 120,000 files cost at least 61 MB of headers alone — though compression removes most of the padding because it is all zeros.
Formula
tar size
uncompressed = data + files x header block + padding to block boundaries + 2 end blocks; compressed = uncompressed / ratio
Worked example
With the default values below, Tar Archive Size Calculator returns Compressed archive size of 2.70 GiB. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Files to archiveminimum 1
- 120,000
- Total file dataminimum 0.001 MB
- 8,000 MB
- tar block sizeaccepts 512–10,240 bytes
- 512 bytes
- Compression ratioaccepts 1–50 x
- 2.8 x
Results
- Compressed archive size
- 2.70 GiB
- Uncompressed archive size
- 7.55 GiB
- Header and padding overhead
- 104.98 MiB
- Overhead before compression
- 1.38%
Step by step
- 1Values used
- 2tar size
- 3Compressed archive size= 2,896,457,509
- 4Uncompressed archive size= 8,110,081,024
- 5Header and padding overhead= 110,080,000
- 6Overhead before compression= 1.38
Assumptions and limits
- The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Why does the archive shrink so much when compressed?
Padding is zero bytes and headers are highly repetitive, so both compress almost to nothing. The real data compresses at its own ratio.
Does the blocking factor matter?
It affects the write size to tape or pipe, not correctness. Larger blocking factors improve tape throughput but add more padding at the end of the archive.
Related Calculators
- Backup Size With Retention Calculator
- Block Size Overhead Calculator
- Incremental Backup Size Calculator
- Journal Size Calculator
- Package Update Size Calculator
- Partition Size Plan Calculator
- Account Lockout Policy Calculator
- Bare Metal Sizing Calculator
- Bash Script Runtime Calculator
- Compression Ratio Savings Calculator
You might also need
- Journal Size CalculatorAlso in Linux & System Administration
- Block Size Overhead CalculatorAlso in Linux & System Administration
- Incremental Backup Size CalculatorAlso in Linux & System Administration
- Package Update Size CalculatorAlso in Linux & System Administration
- Partition Size Plan CalculatorAlso in Linux & System Administration
- Backup Size With Retention CalculatorAlso in Linux & System Administration
