Train Test Split Calculator

Enter your dataset size and split ratios to instantly calculate exact sample counts for train, validation, and test sets.

Use the Train Test Split Calculator

Dataset Parameters

Rows / observations in your full dataset

80%
20%

Split Results

Proportion

Common Presets

Copied to clipboard

Summary

This tool calculates the exact number of samples in each split (train, validation, test) for a given dataset size and ratio. Adjust percentages in real time and see how many rows land in each partition. Handy for deciding whether your dataset is large enough for a chosen split strategy.

How it works

  1. Enter the total number of samples in your dataset.
  2. Choose a 2-way (train/test) or 3-way (train/validation/test) split.
  3. Set each split percentage — the tool enforces they sum to 100%.
  4. Results update instantly, showing exact sample counts for each partition.
  5. Use the copy button to grab the breakdown as plain text.

Use cases

  • Verify a dataset is large enough before training a model.
  • Plan stratified splits by knowing exact counts per class.
  • Compare 80/20 vs 70/15/15 split strategies side-by-side.
  • Confirm validation and test sets meet minimum sample thresholds.
  • Communicate dataset partitioning clearly in research papers.
  • Quick sanity check when reading a paper that cites split ratios.

Frequently Asked Questions

Last updated: 2026-06-11 · Reviewed by Nham Vu