Cross-Validation Calculator
Calculate k-fold cross-validation splits, train-test splits, and data utilization for machine learning.
Inputs
Results
Fold Size
2,000
Training Size per Fold
8,000
Test Set Size
2,000
How to Use This Calculator
- Enter the dataset size (total samples) and number of folds (k, typically 5 or 10).
- Input the model training time per fold in seconds.
- Set the performance metric (accuracy, F1, RMSE) and enter the per-fold metric values.
- Review the mean and standard deviation of the cross-validation score.
- A high standard deviation across folds indicates model instability — try regularization or more data.
How the result changes with K-Folds
| K-Folds | Fold Size | Training Size per Fold | Test Set Size |
|---|---|---|---|
| 3.8 | 2,632 | 7,368 | 2,000 |
| 8.3 | 1,205 | 8,795 | 2,000 |
| 14 | 714 | 9,286 | 2,000 |
| 18 | 556 | 9,444 | 2,000 |
What each input means
- Dataset Size
- Total number of samples
- K-Folds
- Number of folds for cross-validation
- Test Set Size
- Percentage for test set
- Validation Set Size
- Percentage for validation set (from training set)
How this is calculated
Formula
Fold Size = Dataset Size / KWorked example, using the default values
- Identify Input Parameters4 parametersDataset Size = 10000, K-Folds = 5, Test Set Size = 20, Validation Set Size = 10 = 4 input(s) provided
- Calculate Fold SizeFold Size2000 = 2000
- Calculate Training Size per FoldTraining Size per Fold8000 = 8000
- Calculate Test Set SizeTest Set Size2000 = 2000
- Calculate Validation Set SizeValidation Set Size800 = 800
- Calculate Final Training SizeFinal Training Size7200 = 7200
Engine last updated . Checked against 2 independently-derived tests — how we verify calculators.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Gradient Descent Calculator
Calculate gradient descent parameters, convergence rate, effective learning rate, and training time estimates.
Machine Learning & AIModel Performance Metrics Calculator
Calculate accuracy, precision, recall, F1 score, MCC, AUC, and other classification performance metrics.
Machine Learning & AIModel Performance Calculator
Complete ML model evaluation. Classification metrics, regression analysis, cross-validation, ROC/AUC curves, and model comparison.
MLOps & AI CostingHyperparameter Grid Search Calculator
Calculate total experiments, time, and GPU cost for hyperparameter grid search with cross-validation.
More in Technology & Computing.