The final book mostly takes place when Harry was 17, the age of adulthood in the Wizard world. But wait! The question was how old he was at the end of the book. The epilogue at the end of the book clearly states that it takes place nineteen years later, which would make him, now a parent, age 36. So to answer the question as asked, at the end of the book Harry was 36.
Hogwarts is the equivalent to middle school +high school in America. At the beginning of his 1st year he had just turned 11, so at the beginning of his 7th year he was 17. The school year ends before his birthday, which is in mid summer, so he was 17.