How to Find Outliers in a CSV — Without Uploading It
An outlier is a value that sits far from the rest of your data — a $9,000 order in a column of $50 ones, a data-entry typo, a sensor that glitched. Finding outliers in a CSV matters because a handful of them can quietly wreck an average, blow up a standard deviation, or skew a model. The good news: the two standard methods are simple arithmetic, and you can run them on your file without uploading it anywhere.
What counts as an outlier?
There’s no single universal cutoff — “outlier” means “far enough from the rest to be worth a second look.” In practice, two rules do almost all the work: the IQR (interquartile range) rule and the z-score rule. Use the IQR rule by default; reach for z-scores when your data is roughly bell-shaped.
Method 1: the IQR rule (the default)
The IQR rule, popularized by statistician John Tukey, is the one behind the “whiskers” on a box plot. It doesn’t assume your data follows any particular shape, which is why it’s the safe default. Here’s the whole method:
- Sort the column and find Q1 (the 25th percentile) and Q3 (the 75th percentile).
- Compute the spread of the middle half: IQR = Q3 − Q1.
- Anything below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR is flagged as an outlier.
The 1.5 multiplier is the conventional choice; some analysts use 3.0 to flag only the most extreme points. Because it’s built on percentiles rather than the mean, the IQR rule is robust — the outliers themselves don’t distort the cutoffs that catch them.
Method 2: z-scores (for bell-shaped data)
A z-score measures how many standard deviations a value is from the mean. The common rule of thumb flags any point with a z-score above +3 or below −3 as an outlier. This leans on the 3-sigma property of a normal distribution: roughly 68% of values fall within one standard deviation of the mean, about 95% within two, and about 99.7% within three — so a value beyond three is genuinely rare.
The catch: the mean and standard deviation are themselves pulled by outliers, so on very skewed data z-scores can under-flag them. That’s why the IQR rule is the safer first pass, and z-scores are best when you already know the column is close to normal.
Which method should you use?
- Skewed, unknown, or small data → IQR rule. It makes no distribution assumption and resists distortion.
- Roughly normal (bell-shaped) data → z-scores. The 3-sigma cutoff has a clean probabilistic meaning here.
- Not sure? Run both and compare. If they disagree wildly, that itself tells you the column isn’t bell-shaped.
Found an outlier? Don’t just delete it
Flagging a value is a prompt to investigate, not a license to drop it. A “wrong-looking” number is sometimes the most important one in the dataset — the fraud, the outage, the whale customer. Before removing anything, ask whether it’s a genuine error (a typo, a unit mix-up) or a real, rare event. Delete the former; keep and explain the latter. When you do change the data, write down what you removed and why, so the result stays reproducible.
The fast way: find outliers without uploading your CSV
You can do all of this by hand, in a spreadsheet, or in a few lines of pandas. But if you just want the answer, Curator’s free outlier tool runs the IQR rule for you: drop in a CSV, pick a column, and it returns the count, the exact cutoffs, and what percentage of rows are outliers.
Worth being precise about how it’s private, because it’s stronger than most tools: the outlier tool runs the whole calculation inside your browser — your file is never uploaded, and because the math is standard arithmetic, nothing is sent to an AI either. Nothing leaves the page. If you later want to ask free-form questions of the same file, the full workbench keeps your rows in the browser too (there, a value-free description of the columns and your question do go to a model to write the code — we’re careful to say exactly what that means).
Quick answers
What is the 1.5 IQR rule for outliers? Compute IQR = Q3 − Q1, then flag any value below Q1 − 1.5×IQR or above Q3 + 1.5×IQR. It’s the default because it makes no assumption about the data’s shape.
IQR or z-score — which is better? IQR for skewed or unknown distributions (it’s robust to the outliers themselves); z-scores for data that’s roughly normal, where the 3-sigma cutoff has a clear meaning.
How do I find outliers without uploading my file? Use a tool that computes them in your browser (like the one above), or run the IQR/z-score math locally in a spreadsheet or pandas — the file never has to leave your device.
The bottom line
Two rules cover almost every case: the IQR rule for a robust default, z-scores when the data is bell-shaped. Flag with the math, then use judgment about what to keep. And you never have to hand your file to a server to do it — find your outliers right in the browser, no upload, no sign-up.
Ask your own data, see the code.
Open the workbench, ask a real question, and read the Python that answered it. Free to start.
Try Curator free