Guide
Drawing a random sample of rows from a CSV or Excel file
Looking at every row is often impossible or unnecessary. An auditor checks 50 invoices out of 8,000, a developer tests an import with 1,000 rows before loading a million, a researcher contacts a random subset of respondents, a teacher picks a few homework submissions to review in class. This tool takes a sample from a CSV or Excel file and lets you repeat exactly the same draw later.
Simple random sample
“Random” picks the chosen number of rows, each row equally likely, and never the same row twice. Enter the size as a number of rows or as a percentage of the file, such as 5 percent. The picked rows are kept in their original order, which makes them easy to find in the source file.
Reproducible with a seed
Random choices come from a generator started by the seed number. The same file, the same size and the same seed always give the same sample. Write the seed down in your audit notes, and anyone can reproduce your draw with this tool. Click the shuffle button to start from a new, random seed when you want a fresh sample.
Random per group
“Random per group” keeps the proportions of a column. If 80 percent of your rows are from Europe and 20 percent from Asia, a sample of 10 takes 8 European and 2 Asian rows. When proportions do not divide evenly, the groups with the largest remainders get the extra rows. Use it so that small groups are represented fairly instead of being missed by chance.
Every n-th row
Systematic sampling takes row 1, then every n-th row after it. It is simple to explain and spreads the sample evenly through a file, which suits time-ordered logs. It is not random: if the data has a repeating pattern, such as a weekly cycle and every seventh row, the sample can be biased.
First and last rows
First rows and last rows are not samples in the statistical sense, but they are handy for quick tests, such as importing the first 100 rows to check a template, or reviewing the most recent entries in a log.
The rows that were not picked
Switch on the option to show and download the remaining rows instead of the sample. Together, sample and remainder split the file into two parts, for example a training set and a test set, or a group to contact now and one to contact later.
Counts at a glance
The summary shows the rows in the file, the rows picked and their share. For group samples, the number picked per group is listed below.
How big should a sample be?
For estimating a share, such as the error rate of invoices, a few hundred random rows give a margin of error of about five percentage points regardless of how large the file is. Audit standards and research designs often prescribe sizes; follow them where they apply.
Related tools
To split a file into many parts rather than draw a sample, use Split CSV File. To pick names from a short list on screen, try the Random Name Picker. For realistic test data without real records, see the Mock Data Generator.
Checked against the current version of the Sample CSV Rows on .

