K-Fold Cross-Validation Size Calculator
Enter your dataset size and number of folds to see exact training and validation sample counts for each fold.
Use the K-Fold Cross-Validation Size Calculator
Dataset Parameters
Total number of samples in your dataset.
Typical values: 5 or 10.
Summary
—
Base fold size
—
Remainder
—
Min training
—
Max training
Fold Breakdown
Enter parameters and click Calculate Splits to see fold breakdown.
| Fold | Validation samples | Training samples | Val % | Train % |
|---|
Fold size visualization
Copied to clipboard
Summary
Enter your dataset size and number of folds to see exact training and validation sample counts for each fold.
How it works
- Enter the total number of samples in your dataset.
- Set k — the number of folds you want to split the data into.
- The calculator divides the dataset into k roughly equal folds.
- Remainder samples (when dataset size is not divisible by k) are distributed one per fold across the first folds.
- Each row shows which fold acts as the validation set while the rest form the training set.
- Use the results to allocate data in your cross-validation loop.
Use cases
- Verify fold sizes before writing a cross-validation training loop.
- Plan compute time by knowing exact training set sizes per fold.
- Check how remainder samples are distributed when dataset size is not divisible by k.
- Compare the effect of different k values on validation set size.
- Communicate dataset splits clearly in research papers or team discussions.
- Quickly estimate validation set size for a given dataset and fold count.
Frequently Asked Questions
Last updated: 2026-09-19 ·
Reviewed by Nham Vu