Machine learning guide · Updated December 2026

How much data is needed for machine learning?

There is no single number. How much you need depends on the problem, the number of features, how rare the outcome is, and how strong the signal is. Start from the rules of thumb below, then use a learning curve to check if more data would actually help.

Rules of thumb

Starting points by problem type.

These are floors for a first model, not targets. They tell you whether a project is plausible before you spend weeks on it.

ProblemRule of thumbWorked example
Classification on business dataChurn, lead conversion, fraudCount the rare outcome, not the rows. A common starting point is 10 to 20 cases of the rarer class for every feature you use.2% churn and 15 features means roughly 150 to 300 churners, so 7,500 to 15,000 customers.
Regression on business dataCustomer value, basket size, price responseAt least 10 to 20 rows per feature as a floor, and more when the signal is weak or noisy.20 features means 200 to 400 rows as a bare minimum.
Time-series forecastingDemand, sales, occupancyHistory covering at least two full seasonal cycles, ideally three. Rows matter less than cycles.Yearly seasonality needs 2 to 3 years. Promotions and holidays need several occurrences each.
Cause and effect (uplift, promotions, pricing)Did the offer change behaviour?Enough comparable cases with and without the action, and enough outcomes in both groups.A million rows where everyone got the offer cannot show what the offer did.
Images and textDefect photos, support ticketsTraining from scratch takes very large datasets. Starting from a pre-trained model can bring this down to hundreds of labelled examples per class.Test on your own data before trusting a small-sample result.

The "10 events per feature" rule comes from simulation studies of logistic regression (Peduzzi et al., 1996). Later work (Riley et al., BMJ 2020) showed the right number also depends on the outcome rate and the expected model performance, so treat it as a minimum.

Quick estimator

Estimate a starting dataset size.

Pick your problem and fill in two numbers. The result applies the rules of thumb above, so it is a sanity check, not a promise of accuracy.

Problem type
Starting point3,000 to 6,000 rowsabout 150 to 300 cases of the rarer outcome

Rule-of-thumb estimate. Validate with a learning curve on your own data.

What drives the number

Six things decide how much data is enough.

01

How strong the signal is

If the outcome depends clearly on a few inputs, a few hundred rows can be enough. Weak, noisy relationships need far more data to separate from chance.

02

How many features you use

Every extra input is something the model has to learn a weight or split for. More features without more rows makes overfitting more likely.

03

How rare the outcome is

With 1% fraud, 100,000 transactions contain about 1,000 fraud cases. Those cases, not the 100,000 rows, limit what the model can learn.

04

How flexible the model is

Gradient-boosted trees and neural networks can fit complex patterns, and they need more data to avoid fitting noise. Linear and regularised models need less.

05

How clean and representative the data is

Wrong labels, leakage from the future, or history that no longer looks like today cost more than missing rows. More bad data does not fix bad data.

06

What the model will be used for

Ranking customers for a campaign tolerates more error than an automated price change. The cost of a wrong answer sets how much evidence you need.

The reliable check

Let a learning curve tell you.

Rules of thumb get you started. A learning curve tells you whether you are done. Train the same model on growing slices of your data, for example 10%, 25%, 50% and 100%, and measure the error on one fixed holdout set each time.

  • Error still falling at 100%: more data will likely help. Collect more before tuning.
  • Error flat for the last slices: more of the same data will not help much. Work on features, labels or the model.
  • Big gap between training and holdout error: the model is overfitting. Simplify it or add data.

For forecasting, use a backtest instead: train on earlier periods, predict later ones, and repeat over several cut-off dates.

Illustrative learning curve: holdout error falls quickly and then flattens as training data grows, while training error rises slightly towards it.Training rows usedErrorMore data helps littleHoldout errorTraining error
Illustrative shape, not real data.

Too little data?

Six ways to get more from what you have.

Use fewer, better features

Drop inputs that are duplicates or noise. Domain-built features, such as days since last order, often carry more signal than dozens of raw columns.

Choose a simpler or regularised model

Regularised linear models and shallow trees are harder to overfit, and you can still compare them with more complex models on a holdout set.

Start from a pre-trained model

For images and text, fine-tuning a model trained on a large general dataset usually beats training from scratch on a small one.

Pool related data

Forecast stores or products together, so sparse series borrow strength from similar ones, instead of fitting each one on its own.

Augment carefully

Flipped or cropped images and paraphrased text can help. Synthetic rows for tabular data are riskier: they can only repeat patterns already in the data.

Collect the data you are missing

When the gap is about cause and effect, a small controlled test, such as a holdout group, gives more evidence than more historical rows.

A reality check

Famous results used more data than people think.

Headline AI results are often quoted as proof that small data is enough. The well-known medical imaging studies point the other way.

Skin cancer classification (Esteva et al., Nature, 2017) trained on about 129,000 clinical images.

Diabetic retinopathy detection (Gulshan et al., JAMA, 2016) developed its model on about 128,000 retinal images.

Both started from networks pre-trained on millions of general images. Small, focused business problems on tabular data usually need far less, but the evidence has to come from your own validation, not from someone else's headline.

For business decisions

Prediction and decision need different data.

A churn model built with predictive analytics or AutoML can rank customers well from purchase history alone. Deciding whether a retention offer works is a different question. It needs customers who got the offer and comparable customers who did not, with outcomes for both.

That is why row counts can mislead. Five years of data where every store ran the same promotion says little about what the promotion did. A few months with a deliberate holdout can say much more.

Graphite Note is built around this distinction. Read more about causal machine learning, how a decision object reports when the data cannot support an answer, and the terms in our glossary.

Responsible data

More data is not always better data.

Collect what the question needs, not everything you can. Personal data used for modelling must have a lawful basis under GDPR, and less of it is easier to protect.

Check that the data covers the people, products and periods the model will be used on. A model trained mostly on one region or customer type will be less reliable for the others, however many rows it saw.

Direct answers

Questions about data size.

Is there a minimum number of rows for machine learning?

No universal minimum exists. As a starting point, aim for 10 to 20 examples per feature for regression, and 10 to 20 cases of the rarer outcome per feature for classification. Then check with a learning curve whether more data would still improve the model.

Is the 10 times rule reliable?

It is a reasonable first guess, not a guarantee. It comes from studies of logistic regression, and later research showed the right number depends on the outcome rate, the strength of the signal and the model. Treat it as a floor and validate on held-out data.

How much history do I need for demand forecasting?

At least two full seasonal cycles, so two years of history for yearly seasonality, and ideally three. Events such as promotions or holidays need several past occurrences each before a model can estimate their effect.

Can I build a model with a small dataset?

Often, yes, if the signal is strong and the model is kept simple. Use few, meaningful features, a regularised or pre-trained model, and honest validation. If the results swing a lot between validation folds, the data is not enough yet.

How do I know if more data would help?

Plot a learning curve. Train on 10%, 25%, 50% and 100% of your data and measure error on the same holdout set. If the error is still falling at 100%, more data will likely help. If it has flattened, work on features or data quality instead.

Not sure your data is enough?

Bring one business question. We will show what your data can support, and what it cannot yet.

Page updated