Skip to content
Calcrivo

Dataset Split Calculator

Calculate train/validation/test sample counts from total dataset size and split percentages.

Inputs

samples
%
%
%

Training Samples

80,000

Validation Samples

10,000

Test Samples

10,000

Step by step

  1. Train samples: total × train%

    100,000 × 80.0%

    = 80,000

  2. Validation samples: total × val%

    100,000 × 10.0%

    = 10,000

  3. Test samples: total − train − validation (avoids rounding drift)

    100,000 − 80,000 − 10,000

    = 10,000

How it works

Dataset splitting divides your total samples into three sets used for different purposes: training samples update model weights, validation samples tune hyperparameters and monitor overfitting during development, and test samples give a final, untouched estimate of real-world performance. A common default is an 80/10/10 split, though larger datasets can often use a smaller validation/test percentage (e.g. 98/1/1) since even 1% of a very large dataset is statistically sufficient, while smaller datasets often need a larger validation/test share to get reliable estimates.

Formula

train_samples = round(total * train_percent / 100); val_samples = round(total * val_percent / 100); test_samples = total - train_samples - val_samples

total
Total number of samples in the dataset
train_percent
Percentage allocated to training
val_percent
Percentage allocated to validation

Frequently Asked Questions

What is stratified sampling and why does it matter?

Stratified sampling ensures each split (train/val/test) preserves the same class/label distribution as the full dataset — this is important for imbalanced datasets, since random sampling alone could leave a minority class underrepresented or entirely absent from one split.

Why do percentages sometimes not add up to exactly 100%?

If your entered train/val/test percentages don't sum to 100, this calculator proportionally rescales them so the resulting sample counts still add up to your total dataset size correctly.

Should I always use an 80/10/10 split?

It's a reasonable default, but very large datasets (millions+ samples) often shrink validation/test to just 1-5% each since that's still plenty of samples for reliable evaluation, freeing up more data for training; very small datasets may need k-fold cross-validation instead of a single fixed split.

What's the difference between validation and test sets?

The validation set is used repeatedly during development to tune hyperparameters and select the best model checkpoint, while the test set should be used only once, at the very end, to report an unbiased estimate of final model performance.

You might also need