Skip to content
ENExplore Calculators

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

  1. 1Values used
  2. 2tar size
  3. 3Compressed archive size= 2,896,457,509
  4. 4Uncompressed archive size= 8,110,081,024
  5. 5Header and padding overhead= 110,080,000
  6. 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.

Tar Archive Size Calculator | Calcrivo