David is approximately 16 years old when the story ends.
When the story opens, David is ten years old. He tells us that he is about ten when he first realizes that mutants are not evil.
That day I had gone off by myself, as I often did. I was, I suppose, nearly ten years old. My next sister, Sarah, was five years older, and the gap meant that I played a great deal alone. (ch 1)
There is a little bit of time that passes between when David meets Sophie and when they realize that Petra is also telepathic.
Somehow, through caution, luck, and quick recoveries we managed to escape direct suspicion and live our two diverging lives for the next six years without the sense of peril becoming sharp. (ch 8)
When Petra falls in the river, she is “only a little over six” and we can therefore extrapolate that David is then sixteen. Since it is not long after that, David is around sixteen when the book ends.
David’s exact age is not as important as his stage in life. David is definitely a young man, and he is learning to accept adult responsibilities. He is also falling in love with Rosalind, but mostly in a pure and juvenile way. David and Rosalind flee with Petra when the existence of the telepaths is discovered, and David has to grow up fast.