Home/Tools

DAQ file size calculator

Data rate and file size of a recording from its channel count, sample rate and length, stored as raw integers, float32, float64 or CSV.

File size
Data rate
Per hour
Values recorded
Bytes per value

This run stored asBytes per valueSize

Sizes are uncompressed and leave out headers and metadata, which are small next to the data once a run is longer than a few seconds. HDF5 and Parquet can compress, and MATLAB compresses v7 and v7.3 MAT-files by default, so files in those formats often come out smaller.

How the file size is calculated

A DAQ recording stores one value per channel per tick of the sample clock:

values    = channels * sample rate * duration
file size = values * bytes per value
data rate = channels * sample rate * bytes per value

Binary formats store each value in a fixed width (2 bytes for a 16-bit integer, 4 for a 32-bit float, 8 for a 64-bit double). A 24-bit converter’s output normally sits in a 4-byte word unless the format packs it into 3 bytes. CSV stores each value as text, so its size depends on how many digits you print. The calculator estimates a CSV value as the digits you choose, a decimal point and a minus sign on about half the values, then adds the delimiters, the timestamp column and the line ending for each row. Sizes use decimal units, so 1 GB is 1,000,000,000 bytes.

Worked example: 16 channels at 50 kS/s for two hours

Sixteen channels at 50 kS/s each is 800,000 values per second, or 5.76 billion values over 7,200 seconds.

Stored asBytes per valueTwo-hour file
int16 raw211.52 GB
float32 (TDMS, HDF5 or Parquet, uncompressed)423.04 GB
float64 (MATLAB .mat or HDF5, uncompressed)846.08 GB
CSV, 7 digits, elapsed-seconds timestampabout 10.258.68 GB

Each CSV row in that example holds a 10-character timestamp (four integer digits to reach 7,200 s, a decimal point and five decimals to resolve the 20 µs sample period), 16 values of about 8.5 characters, 16 commas and a newline. That comes to 163 bytes per row, about 10.2 bytes per value, so the CSV ends up larger than the float64 file and much slower to load. The guide to test data file formats compares CSV, TDMS, HDF5, Parquet and MAT for long recordings.

Compression and real file sizes

HDF5 and Parquet compress per dataset or column, and MATLAB compresses v7 and v7.3 MAT-files by default. The savings depend on the signal. Noisy analog channels from a 16-bit converter have little redundancy in their low bits and shrink only modestly, while thermocouples, digital lines and values pinned at a rail compress far better. Plan storage around the uncompressed numbers and treat compression as margin.

File headers, channel names and scaling metadata add kilobytes to gigabytes of data, so container overhead only shows up in very short runs with hundreds of channels.

Common mistakes when sizing a recording

Recording and exporting in DAQAtlas

DAQAtlas, which is in development, records to its own .edaq format (a JSON header followed by raw samples, readable even after a crash) and exports to CSV, MATLAB .mat, TDMS, Parquet and HDF5. An export can cover the whole run, the visible range or the span between cursors, with optional decimation to shrink a file you only need for a report. To check a file you already have, open it in the data file viewer, which reads TDMS, HDF5, Parquet, MAT and CSV.

Questions

How big is a file at 1 kS/s per channel?

Stored as float32, each channel at 1 kS/s produces 4 kB per second, or 14.4 MB per hour. Eight channels for 24 hours comes to about 2.76 GB. CSV is usually two to three times larger than float32.

Is CSV or binary better for long DAQ recordings?

Binary. A float32 file is usually under half the size of the same data as CSV and loads many times faster, since there is no text to parse. Keep CSV for short exports you need to open in a spreadsheet.

How many bytes per sample does a 16-bit DAQ use?

Two bytes if the samples are stored as raw integers. Most software converts to volts and stores float32 (4 bytes) or float64 (8 bytes), which doubles or quadruples the size with no information beyond the converter’s 16 bits.

Why is my file smaller than the calculator says?

The format probably compressed it. HDF5 and Parquet support compression, and MATLAB compresses v7 and v7.3 MAT-files by default. Slow or repetitive signals compress well, while noisy high-rate signals don’t.