In the election, millennials and Generation Xers cast 69.6 million votes, which is a slight majority of the 137.5 million votes cast nationwide, the analysis found. Baby boomers and older voters, meanwhile, cast 67.9 million votes.
Millennials were ages 18 to 35 last year and accounted for 25 percent of the vote while Gen Xers were 36 to 51 last year and accounted for 26 percent of the vote. The younger age group of the two cohorts cast 34 million votes last year, which is up from 18.4 million that the age group cast in 2008.
While Gen Xers slightly outvoted millennials in 2016, Pew says the millennial vote could surpass the older group in the 2020 presidential election.
Pew says that the baby boomer vote peaked in the 2004 presidential election with 50.1 million votes.
© 2017 CBS Interactive Inc. All Rights Reserved.