Training Data Size Calculator
Estimate minimum dataset size needed for machine learning models based on features, complexity, and accuracy targets.
About this calculator
This calculator applies a classic rule-of-thumb from statistical learning theory rather than a dataset-specific calculation: it multiplies Number of Features by a per-feature-per-class sample count that depends entirely on Model Complexity -- roughly 20 samples per feature for Linear/Logistic models (in the range Peduzzi et al.'s "events per variable" guidance for regression suggests), roughly 80 for Tree/Ensemble methods, and roughly 2,000 for Deep Neural Networks, reflecting how much more data flexible, high-capacity models need to generalize instead of memorize. Target Accuracy (%) scales that base count further: at or below a 70% target the multiplier sits at its floor (matching the idea that easy accuracy targets don't need extra data beyond the base rule-of-thumb), then rises with the SQUARE of how far Target Accuracy (%) climbs above 70% -- reflecting the well-known "diminishing returns" pattern where each additional accuracy point costs disproportionately more data than the last. Minimum Total Samples multiplies that per-class figure by Number of Classes, since a K-class problem needs roughly K times the per-class sample count to give every class enough examples.
Est. Collection Time assumes a flat 2 minutes of manual labeling effort per sample, a labor-planning estimate rather than a property of the model. Because this is a coarse heuristic, not a statistical power calculation, treat its output as a starting planning figure -- real minimum viable dataset size depends heavily on label quality, feature informativeness, and class balance that no simple rule-of-thumb can capture.
Inputs
Results
Minimum Total Samples
2,890
Samples per Class
578
How to Use This Calculator
- Enter the Number of Features in your dataset and select Model Complexity — Linear/Logistic, Tree/Ensemble, or Deep Neural Network — since more complex models need proportionally more data per feature.
- Set your Target Accuracy (%) — pushing above roughly 70% requires disproportionately more data as the target climbs, not a simple linear increase.
- Enter the Number of Classes for your classification problem (use 2 for binary classification).
- Review Minimum Total Samples and Samples per Class to see the dataset size this rule-of-thumb recommends.
- Use Est. Collection Time (hrs) to budget manual labeling effort at roughly 2 minutes per sample.
How the result changes with Target Accuracy (%)
| Target Accuracy (%) | Minimum Total Samples | Samples per Class |
|---|---|---|
| 60% | 2,000 | 400 |
| 68% | 2,000 | 400 |
| 99% | 3,870 | 774 |
What each input means
- Number of Features
- Number of input features/variables in the dataset
- Model Complexity
- More complex models need significantly more training data
- Target Accuracy (%)
- Desired model accuracy — higher targets require exponentially more data
- Number of Classes
- Number of output classes for classification (2 for binary)
How this is calculated
Worked example, using the default values
- Identify Input Parameters4 parametersNumber of Features = 20, Model Complexity = 1, Target Accuracy (%) = 90, Number of Classes = 5 = 4 input(s) provided
- Calculate Minimum Total SamplesMinimum Total Samples2890 = 2890
- Calculate Samples per ClassSamples per Class578 = 578
- Calculate Est. Collection TimeEst. Collection Time96 = 96
Engine last updated . Checked against 2 independently-derived tests — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.
Frequently Asked Questions
Why do Deep Neural Networks need roughly 100x more samples per feature than a Linear/Logistic model?
Model Complexity sets a per-feature-per-class sample multiplier that reflects how much a model class can overfit: Linear/Logistic models have relatively few parameters and a well-understood, low-variance fit, needing roughly 20 samples per feature; Deep Neural Networks have vastly more parameters and can memorize small datasets instead of generalizing, so the rule-of-thumb multiplier jumps to roughly 2,000 samples per feature to keep the model learning real patterns rather than noise.
Why doesn't lowering Target Accuracy (%) below 70% reduce Minimum Total Samples any further?
Below a 70% target this calculator's accuracy multiplier sits at its floor value -- the same value used at exactly 70% -- rather than continuing to shrink, since the base per-feature sample count set by Model Complexity is treated as the minimum viable dataset regardless of how modest the accuracy goal is. The multiplier only grows once Target Accuracy (%) climbs ABOVE 70%, reflecting that each additional accuracy point above a modest baseline costs disproportionately more data than the last.
Why does Minimum Total Samples grow so much faster near Target Accuracy (%) = 99 than near 80?
The accuracy multiplier scales with the SQUARE of how far Target Accuracy (%) sits above 70%, so the gap between 80% and 90% (10 points) adds far less than the gap between 90% and 99% (9 points) does -- squaring means the marginal data cost accelerates as the target approaches the ceiling, mirroring the real-world "diminishing returns" pattern where the last few accuracy points are the most expensive to earn.
Does Number of Classes multiply the total, or just spread the same samples across more categories?
It multiplies the total: Samples per Class is computed first from Number of Features, Model Complexity, and Target Accuracy (%), then Minimum Total Samples is that per-class figure times Number of Classes. A 10-class problem is therefore estimated to need roughly 5x the total data of a comparable 2-class problem, not the same total split five ways thinner, since each class still needs enough examples on its own.
Is Est. Collection Time (hrs) based on how hard the labeling task is?
No -- it applies a single flat assumption of about 2 minutes of manual effort per sample to Minimum Total Samples, regardless of whether labeling means a simple category click or a complex multi-step annotation. Treat it as a rough labor-planning placeholder; a genuinely difficult labeling task (medical imaging, detailed bounding boxes) will take far longer per sample than this estimate assumes.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Data Augmentation Calculator
Calculate effective dataset size after augmentation, accounting for diversity and quality degradation.
MLOps & AI CostingData Annotation Cost Calculator
Estimate labeling costs for ML datasets by task type, dataset size, and annotator rates.
MLOps & AI CostingGPU Training Cost Calculator
Estimate cloud GPU training time, cost, and CO2 emissions for machine learning model training.
Machine Learning & AIGradient Descent Calculator
Calculate gradient descent parameters, convergence rate, effective learning rate, and training time estimates.
Data ScienceFeature Scaling Calculator
Scale raw feature values using min-max normalization, z-score standardization, robust scaling, and max-abs normalization for machine learning preprocessing.
More in Technology & Computing.