The Congressional Research Service released a report chock full of data on terms in office. Contrary to some popular caricatures, the average member of Congress is not an establishment figure who has been in Washington, DC for decades gorging himself at the public trough. As the figure above shows, half of House legislators have served 8 years or less.
That said, the average tenure for both chambers has increased over the past two centuries.
"During the 19th century, the average service of Representatives and Senators remained roughly constant, with little or no change over time; the average years of service was slightly higher for the first half of the century than during the second. During the late 19th and through the 20th century, the average years of service for Senators steadily increased, from an average of just under 5 years in the early 1880s to an average of just over 13 years in recent Congresses. Similarly, the average years of service of Representatives increased from just over 4 years in the first two Congresses of the 20th century to an average of approximately 10 years in the three most recent Congresses."
"Congressional Careers: Service Tenure and Patterns of Member Service, 1789-2017," (CRS R41545) can be downloaded at https://www.everycrsreport.com/files/20170103_R41545_46ced9f7a8ec97adf2ec7b2f7663795d015cc514.pdf