The AR-15 rifle police say Nikolas Cruz used to kill 17 people at his former high school on Wednesday was his legally. He bought it about a year ago, when he was 18, at which point Florida law allowed him to buy a long gun like the AR-15. He had to pass a background check, which he did, and, while the law also prohibits the sale of weapons to “any person of unsound mind,” Cruz’s already-known emotional issues weren’t flagged in the review process. He wanted a gun; he bought a gun.

There’s been commentary after the massacre in Parkland about whether someone who is 18 should have been able to make that purchase. He’s too young to buy a handgun or a beer, but he’s old enough to buy a rapid-fire rifle that has been used in many of the most deadly mass shootings in recent history?

Well, yeah. And he’s not the only one. According to the Giffords Law Center‘s review of state laws, Cruz was old enough to buy an AR-15 in 48 states and D.C. (The Giffords Law Center is a pro-gun-control organization named for former Arizona congresswoman Gabby Giffords.) In 10 states, in fact, he was older than he legally needed to be: In nine of those states, people younger than 18 can buy long guns with their parents’ permission. In Vermont, the minimum age is 16.

If we extrapolate that idea, we come to a remarkable realization.

In 2015, 19.8 percent of 18- and 19-year-olds in America were enrolled in high school. Nationally, there were about 8.5 million people in that age group that year.

If we combine these three data points — how many states allow 18- and 19-year-olds to buy AR-15s, what percent of people in that age group are in high school and how many people are in that age group by state — we can determine the number of high school students old enough to legally buy AR-15 rifles in the states in which they live.

A bit over 1.6 million.

(And 15,000 16- and 17-year-olds in Vermont aren’t included in this tally but fit the criteria.)

That excludes those who might have been allowed to buy such weapons with their parents’ permission and, of course, those whose parents have firearms at home. It also excludes purchases made through non-dealer sales, like buying a weapon from a family member, for which legal requirements are lower.

There are other barriers to purchasing firearms, of course. Those background checks, for one, and the cost of the weapons. (They cost hundreds of dollars.) But legally? Cruz, despite the questions that had been raised about his behavior and his classmates’ concerns, had every right to walk into a gun store in Florida, hand over his money and walk out with the weapon that he used earlier this week.

Just as more than a million-and-a-half other high school kids could nationally.