Train Test Split Size Calculator
Work out train test split size instantly with clear inputs, formula shown and shareable results.
About Train Test Split Size Calculator
A three-way split gives the model data to learn from, a validation set for tuning decisions, and a test set touched only once at the end. The validation share is whatever the training and test shares leave over. Row counts matter more than percentages: a 15 percent test set of 300 rows is 45 examples, far too few to separate two models with confidence.
Formula
Split sizing
train = rows x train share; test = rows x test share; validation = rows - train - test
Worked example
With the default values below, Train Test Split Size Calculator returns Training rows of 7,000. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Total rows in the datasetminimum 3
- 10,000
- Training shareaccepts 1–98 %
- 70 %
- Test shareaccepts 1–98 %
- 15 %
Results
- Training rows
- 7,000
- Validation rows
- 1,500
- Test rows
- 1,500
- Remaining share
- Validation share is 15 percent
Step by step
- 1Values used
- 2Split sizing
- 3Training rows= 7,000
- 4Validation rows= 1,500
- 5Test rows= 1,500
- 6Remaining share= Validation share is 15 percent
Assumptions and limits
- The result is derived only from the 3 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 whole numbers, 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 keep validation and test separate?
Every tuning decision made against a set leaks information into it. Holding a genuinely untouched test set is the only way to get an unbiased estimate of generalisation.
What if the dataset is small?
Prefer k-fold cross-validation for model selection and keep one modest held-out test set. Repeated fitting uses every row for training at some point.
Related Calculators
- A B Test For Models Calculator
- Annotation QA Sample Size Calculator
- Batch Size Selection Calculator
- Dataset Size Requirement Calculator
- Feature Store Size Calculator
- Human Review Sample Size Calculator
- Model Size In Memory Calculator
- Quantisation Size Savings Calculator
- Retrieval Chunk Size Calculator
- Stratified Split Sizes Calculator
You might also need
- A B Test For Models CalculatorAlso in AI, ML & Data Science
- Annotation QA Sample Size CalculatorAlso in AI, ML & Data Science
- Batch Size Selection CalculatorAlso in AI, ML & Data Science
- Dataset Size Requirement CalculatorAlso in AI, ML & Data Science
- Feature Store Size CalculatorAlso in AI, ML & Data Science
- Model Size In Memory CalculatorAlso in AI, ML & Data Science
