# CSV Export File Size and Split Calculator

> Source: https://netray.co/tools/csv-export-file-size-and-split-calculator
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Estimate the size of an ERP CSV extract and how many files you need to stay under Excel's row limit or an upload size cap.

## Category

developer

## Audience

- ERP analyst
- Data analyst
- ERP consultant

## Tool

**Kind:** calculator

**Inputs:**

#### Data rows

**Key:** row_count

**Type:** number

**Default:** 2500000

**Min:** 1

**Step:** 100000

**Unit:** rows

**Help:** Number of rows you expect, excluding the header.

#### Columns

**Key:** columns

**Type:** number

**Default:** 18

**Min:** 1

**Step:** 1

**Unit:** columns

#### Average characters per field

**Key:** avg_chars

**Type:** number

**Default:** 12

**Min:** 1

**Step:** 1

**Unit:** chars

**Help:** Take a sample of 1,000 rows and divide the file size by rows times columns.

#### Text encoding

**Key:** encoding

**Type:** select

**Default:** 1.1

**Options:**

##### ASCII or Latin-1 data, UTF-8 (about 1.0 byte per char)

**Value:** 1

##### Mostly English with some accents (about 1.1)

**Value:** 1.1

##### Mixed with Chinese, Japanese or Korean text (about 2.2)

**Value:** 2.2

##### UTF-16 (2 bytes per char)

**Value:** 2

**Help:** Bytes per character on average.

#### Maximum file size allowed

**Key:** max_file_mb

**Type:** number

**Default:** 25

**Min:** 1

**Step:** 1

**Unit:** MB

**Help:** For example an email attachment or portal upload limit.

#### Zip or gzip saving

**Key:** zip_saving_pct

**Type:** number

**Default:** 80

**Min:** 0

**Max:** 95

**Step:** 5

**Unit:** %

**Outputs:**

#### Average bytes per row

**Key:** row_bytes

**Expr:** columns * avg_chars * encoding + columns + 1

**Format:** integer

**Description:** Field bytes, delimiters between columns and a two byte line ending.

#### Estimated CSV size

**Key:** total_mb

**Expr:** row_count * row_bytes / 1048576

**Format:** number

**Primary:** true

#### Size after zip or gzip

**Key:** zipped_mb

**Expr:** total_mb * (1 - zip_saving_pct / 100)

**Format:** number

#### Files needed for Excel row limit

**Key:** files_excel

**Expr:** ceil(row_count / 1048575)

**Format:** integer

**Description:** Excel allows 1,048,576 rows including the header row.

#### Files needed for size cap

**Key:** files_size

**Expr:** ceil(total_mb / max_file_mb)

**Format:** integer

#### Files needed overall

**Key:** files_needed

**Expr:** max(files_excel, files_size)

**Format:** integer

**Primary:** true

#### Rows per file

**Key:** rows_per_file

**Expr:** ceil(row_count / files_needed)

**Format:** integer

**Chart:**

#### Estimated CSV size (MB) versus row count

**Type:** line

**X:** row_count

**From:** 100000

**To:** 5000000

**Steps:** 25

**Series:**

- total_mb

**Disclaimer:** Estimates assume average field lengths. Quoted fields, embedded commas and long text add bytes. Sample real rows before you design an export or a split.

## Content

**Intro:** Before you run a big ERP extract, you want to know whether the result will open in Excel or fit through an upload portal. This calculator estimates CSV size from rows, columns and encoding, then tells you how many files you need and how many rows go in each.

**Sections:**

#### How to use it

**Body:** Enter the row count from a SELECT COUNT, the number of columns and the average characters per field. The quickest way to get that average is to export 1,000 sample rows and divide file size by rows times columns. Choose the encoding that matches your data: Chinese, Japanese and Korean text uses about three bytes per character in UTF-8. Add the size limit of the destination and the zip saving. The tool returns the size and the number of files.

**Bullets:**

- Sample real rows, not the header
- Pick the encoding for your longest text columns
- Use the Excel row limit as a hard floor on file count

#### The arithmetic

**Body:** Each row consists of its field bytes, one delimiter between each pair of columns and a line ending of one or two bytes. So row bytes are columns times average characters times bytes per character, plus the delimiters and line end. Total size is rows times row bytes. Excel and many tools stop at 1,048,576 rows including the header, so the file count is the larger of the row-limit split and the size-cap split.

#### Worked example

**Body:** 2.5 million rows, 18 columns and 12 characters per field at 1.1 bytes gives about 257 bytes per row and roughly 613 MB. Excel needs at least 3 files because 2.5 million is more than twice the row limit. A 25 MB portal cap needs 25 files, which dominates. Zipped at 80 percent, the same data is around 123 MB, which still needs 5 uploads. That tells you to compress, filter or load to a database instead of Excel.

#### Common mistakes

**Body:** People forget the header row when splitting, which silently drops a record in Excel. Others split by byte count in the middle of a quoted field and corrupt the file. Always split on row boundaries and repeat the header in each part. For anything above a few hundred thousand rows, ask whether Excel is the right destination.

**Cta:** If analysts keep exporting huge CSVs by hand, we can set up a governed, read-only extract or chat interface over your ERP data on your own servers.

**Faq:**

#### What is the Excel row limit?

**Answer:** Modern Excel worksheets hold 1,048,576 rows and 16,384 columns. The header row counts as a row, so a CSV with a header holds at most 1,048,575 data rows per sheet. Older xls format is limited to 65,536 rows.

#### Why is my CSV bigger than expected?

**Answer:** Quotes around text fields, long descriptions, trailing spaces from fixed-width CHAR columns and wide encodings all add bytes. Trim padded CHAR values and only quote when needed. Use the average length from a real sample.

#### How do I split a CSV safely?

**Answer:** Split on whole rows, repeat the header in each file, and keep the same column order and encoding. Avoid splitting by raw bytes. Many scripting tools and database export utilities can write chunks of a fixed number of rows.

#### Does zip really save 80 percent?

**Answer:** For text-heavy ERP extracts with repeated codes and dates, 75 to 90 percent is common. Highly random data such as hashes or GUIDs compresses much less. Compress a real sample to check before you rely on it.

## Search terms

csv file size calculator, excel row limit 1048576 split csv, how big will my csv be, erp extract file size estimate, split csv by size, utf-8 csv size, csv gzip size estimate

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
