Variable data merge batches calculator

Each template produces a separate set of files with equal per-record size.

Your inputs

Use the units shown.

Records per full file
20
Files per template
6
Total output files
18
Record ranges per template
1–20, 21–40, 41–60, 61–80, 81–100, 101–105
Bytes in final file per template
6,000

Your calculation
How is this calculated?

Minimum of record cap and roundDown((byte cap − fixed file bytes) ÷ bytes per record).

Round up record count ÷ capacity. Zero records produce no files.

Files per template × template count.

List consecutive inclusive 1-based record ranges for each template.

Fixed bytes + final batch record count × bytes per record; zero when no files exist.

Each template produces a separate set of files with equal per-record size. Packs consecutive records by the smaller record-count and byte cap. File ranges are the same for every template. At most 1,000 batches per template are displayed.

OpenStax: percentages and proportions ↗

Try an example

Worked example

Records per full file: 20

Inputs
  • Data records: 105
  • Templates generated per record: 3
  • Bytes per rendered record per template: 1000
  • Maximum output file bytes: 50000
  • Fixed bytes per file: 1000
  • Maximum records per output file: 20

Compare inputs

Records per full file: 4

Inputs
  • Data records: 10
  • Templates generated per record: 2
  • Bytes per rendered record per template: 100
  • Maximum output file bytes: 500
  • Fixed bytes per file: 100
  • Maximum records per output file: 10
Share this page
Share this calculator

Leave unchecked to share the page without your entered values.