Sample dataset · CC0
Who left, and what pushed them out.
Everyone who worked at one invented company between July 2024 and June 2026: department, level, pay, overtime, satisfaction, commute and work mode, plus whether they left, on what date and why. In the 1,000-row file 171 people leave. The reasons are in the data, and they are the ones HR teams actually see.
16 columns · 100 or 1,000 rows as a file · up to 1,000,000 rows generated here · CSV, JSON, JSONL, Excel, Parquet
Download the HR attrition data
Take the 1,000-row file for analysis. Its attrition rate is 17.1%, and every driver shows up in it the same way it does at a million rows, which I made sure of (the section on sample size explains how). The 100-row file has 19 leavers: enough to practise a formula, not enough to trust a percentage.
| Format | Small | Standard |
|---|---|---|
| CSV | 100 rows (7.6 KB) | 1,000 rows (73.6 KB) |
| JSON | 100 rows (33.3 KB) | 1,000 rows (332.2 KB) |
| JSONL | 100 rows (33.0 KB) | 1,000 rows (329.3 KB) |
| Excel | 100 rows (25.5 KB) | 1,000 rows (181.9 KB) |
| Parquet | 100 rows (5.6 KB) | 1,000 rows (22.0 KB) |
A bigger company
Bigger sizes add people, not years. A 100,000-row file is a company of 100,000 over the same two-year window, still hiring more each year than the last. Use it if you are fitting a model and want the coefficients to stop wobbling between runs.
The first eight rows
The first eight rows of the 1,000-row file. Rows run in hire order, so these are the longest-serving staff. EMP-000008, a remote support agent who rated satisfaction 1, left on 26 May 2026 and gave "Manager or team" as the reason; the other seven are still there, so their exit columns are blank.
| employee_id | department | job_level | age | hire_date | years_at_company | monthly_income | overtime | job_satisfaction | performance_rating | distance_from_home_km | years_since_promotion | work_mode | attrition | exit_date | exit_reason |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EMP-000001 | Customer Support | 4 | 38 | 2015-01-05 | 11 | 9700 | true | 3 | 4 | 15 | 10 | Onsite | No | ||
| EMP-000002 | Research | 5 | 64 | 2015-01-21 | 11 | 16710 | true | 4 | 4 | 19 | 1 | Onsite | No | ||
| EMP-000003 | Engineering | 3 | 55 | 2015-02-03 | 11 | 8280 | true | 4 | 3 | 8 | 0 | Hybrid | No | ||
| EMP-000004 | Sales | 4 | 39 | 2015-02-14 | 11 | 10050 | false | 1 | 5 | 4 | 0 | Hybrid | No | ||
| EMP-000005 | Operations | 3 | 44 | 2015-02-24 | 11 | 7860 | true | 3 | 4 | 4 | 0 | Hybrid | No | ||
| EMP-000006 | Engineering | 4 | 41 | 2015-03-06 | 11 | 15220 | false | 4 | 3 | 2 | 3 | Hybrid | No | ||
| EMP-000007 | Sales | 5 | 60 | 2015-03-15 | 11 | 19290 | true | 4 | 3 | 2 | 11 | Hybrid | No | ||
| EMP-000008 | Customer Support | 3 | 42 | 2015-03-24 | 11 | 7690 | true | 1 | 3 | 3 | Remote | Yes | 2026-05-26 | Manager or team |
Sixteen columns, and what each one holds
| Column | Type | What it holds | Example |
|---|---|---|---|
| employee_id | text | EMP-000001 upward, in hire order. | EMP-000001 |
| department | text | One of eight departments. | Customer Support |
| job_level | integer | 1 (entry) to 5 (director). Rises with tenure. | 4 |
| age | integer | Age on 2026-06-30, or on the exit date for leavers. | 38 |
| hire_date | date | Start date, 2015-01-05 to 2026-04-30, ascending through the file. Recent years hire more. | 2015-01-05 |
| years_at_company | integer | Whole years from hire_date to exit_date, or to 2026-06-30 for people still there. | 11 |
| monthly_income | integer | Gross monthly pay in USD, banded by job level and adjusted by department. | 9700 |
| overtime | boolean | true for people who regularly work overtime. The strongest single push toward leaving. | true |
| job_satisfaction | integer | Last survey answer, 1 (low) to 4 (high). | 3 |
| performance_rating | integer | Last review, 1 to 5. Most people get a 3. | 4 |
| distance_from_home_km | integer | One-way commute in km. Blank for remote staff, who have no commute. | 15 |
| years_since_promotion | integer | Whole years since the last promotion, never more than years_at_company. | 10 |
| work_mode | text | Onsite, Hybrid or Remote. | Onsite |
| attrition | text | Yes if the person left between 2024-07-01 and 2026-06-30, otherwise No. | No |
| exit_date | date | Last working day, always a weekday. Blank when attrition is No. | |
| exit_reason | text | Why they said they left. Blank when attrition is No. |
Practice questions to try
- What is the overall attrition rate, and which department loses the largest share of its people? In the 1,000-row file: 17.1%. Customer Support loses 39 of 161, or 24.2%; Sales is next at 20.2%.
- How much more likely is someone who works overtime to leave? 32.8% against 10.0%, a little over three times.
- Does attrition fall as job satisfaction rises? 36.1% at a score of 1, then 18.7%, 12.1% and 9.5% at 4.
- Do remote staff leave less than people in the office? Remote 9.8%, Hybrid 17.4%, Onsite 19.8%.
- Does a long commute matter? Compare people over 25 km with the rest, leaving remote staff out. 31.5% against 15.3%.
- Which reason do leavers give most often, and does it change if you only look at people who worked overtime? Overall, "Manager or team" (36) just ahead of "Workload and overtime" (34). Among overtime workers, workload is first by a distance: 33 of 102.
- Score each person from 0 to 4, one point each for overtime, satisfaction of 1 or 2, a commute over 25 km and five or more years without a promotion. How does attrition change with the score? 5.2% at 0, 14.1% at 1, 30.8% at 2 and 57.1% at 3.
- Which quarter saw the most exits? October to December 2025, with 27.
Most of these are one pivot: attrition across the top, the driver down the side, a count in the middle. The dashboard view opens the file with charts already drawn, which is a quick way to get to know the columns before you start.
What one row is
One row per person who worked at the company at any point between 1 July 2024 and 30 June 2026. The snapshot is taken on that last day. People who left inside the window have attrition = Yes, an exit_date and an exit_reason. Everyone else is still employed, and their two exit columns are blank on purpose.
Hire dates run from January 2015 to April 2026, ascending through the file, and the company hires more each year than the year before: 48 of the 1,000 started in 2015 and 109 in 2025. years_at_company counts whole years to the exit date, or to 30 June 2026 for people who stayed. Age is taken on the same date. Every exit_date is a weekday, because nobody's last day is a Sunday.
One thing the file does not hold is anyone who left before July 2024. That is how real attrition reports work: you count the people you had during the period you are measuring. It also means the longest-serving staff are survivors, which is one reason attrition falls with tenure.
What pushes people out
Each person's chance of leaving comes from a handful of drivers, combined the way a logistic regression combines them. Overtime is the strongest: 32.8% of people who regularly work overtime leave, against 10.0% of those who do not. Satisfaction is next, falling from 36.1% at a score of 1 to 9.5% at a score of 4. A commute of more than 25 km roughly doubles the rate, and remote staff, who have no commute, leave least of all.
The smaller drivers are there too: pay in the bottom third of the person's band, five or more years without a promotion, a first year in the job, and a rating of 1 at the last review. Customer Support and Sales lose people faster than Research and Finance, partly because more of them work overtime and partly because of the department itself.
The drivers stack. Of the 93 people who work overtime and rate their satisfaction 1, 40 left. Of the 249 who do no overtime and rate it 4, 18 did. Age does nothing on its own except at the very end of a career: from 58 on,"Retirement" becomes a likely reason. Any other age pattern you find comes through tenure and level, which is a good small lesson in confounding.
Why the 1,000-row file can be trusted
With 1,000 people and a 17% rate, chance alone can flip a comparison. In the first version of this file, remote staff left more often than onsite staff, purely by luck of the draw, even though the generator gives remote work a lower risk. A student would have found that, believed it, and been wrong.
So I generated the file at 100,000 rows, wrote down the order of every effect, and keyed the small file's random numbers so that it agrees: overtime above no overtime, each satisfaction score below the last, remote below hybrid below onsite, long commutes above short ones, Customer Support on top. A test in the repository fails if a future change ever breaks that.
The 100-row file was left alone. Its overtime gap still shows (11 of 35 against 8 of 65), but the department rates jump about from one size to the next. That is worth seeing once. It is the reason a percentage should always come with the number of people behind it.
What people use it for
- HR analytics dashboards in Power BI or Tableau: headcount, attrition rate, exits by reason and by quarter.
- Learning to compute a rate with the right denominator, and to show the count beside it.
- Logistic regression and decision tree practice where the true drivers are known.
- Crosstabs and pivots: department by attrition, overtime by attrition, satisfaction by attrition.
- Date work: tenure from hire_date, exits by quarter, the weekday of a last day.
Open it somewhere useful
Attrition is a rate, so the tools worth opening are the ones that split a yes/no column by something else. The crosstab does exactly that.
License, and the people in it
This dataset is dedicated to the public domain under CC0 1.0. Put it in a course, a paid product, a test suite, a bug report, a screenshot, a conference talk or a book. There is nothing to ask for, nothing to sign and no attribution required. A link back is welcome and is not a condition.
Nothing in this file describes a real person. There are no names, birth dates, addresses or national identifiers, only an employee number, a department and the numbers HR systems keep. The company is invented. That makes it safe for a public dashboard or a classroom, which a real attrition export never is.
Questions people ask about this file
Is this the IBM HR attrition dataset?
No. The IBM sample many courses use is a fixed file of 1,470 employees with 35 columns. This one is generated, CC0, and comes in any size from 100 rows to a million. It has fewer columns, and each one either drives the outcome or is there to show that it does not, so an analysis of it ends with an answer you can check.
Why is distance_from_home_km blank for some people?
They work remotely, so they have no commute. A blank here is a real answer, not missing data. Treat it as zero and remote staff will drag the average commute down; drop those rows and the commute comparison becomes fair. Either way, decide on purpose.
Can I train a model on it?
Yes, and you should find overtime and satisfaction as the strongest predictors, with commute, pay position, a stalled promotion and the first year after them. The true rule includes chance, so no model will be perfect. Use the 100,000-row file if you want stable coefficients, and leave out people hired after early 2026, who have barely had time to leave.
Why do almost none of the 2026 hires leave?
They have had a few months at most. Of the 36 people hired in 2026 in the 1,000-row file, 2 left. If you want a cleaner rate, restrict to people hired before 1 July 2024, who were there for the whole window: 145 of those 802 left, or 18.1%.
Can I use it in a course or a published dashboard?
Yes. It is CC0 1.0, so there is nothing to sign and no credit required. Because no real person is in it, you can also publish a dashboard built on it without the privacy review a real HR export would need.
More sample data
All twenty-four datasets · Messy files and every other format · Build your own schema