In the Lord of The Rings trilogy, does anyone know how old Gandalf is? I remember reading that Gandalf was much older than he looked. Do the books ever say how old he is?
Gandalf is a Maia (Spirit), created by Eru among the other Ainur before the Years of the Lamps roughly 9,000+ years before arriving in Middle-earth. In Valinor he was known as Olórin. He was sent to Middle-earth in human form around the year 1000 in the Third Age. That's more than 2000 years before the setting of The Lord of the Rings, to help the free peoples fight the evil of Sauron.
Gandalf walked in Middle-earth for approximately 2,019 years, un-aging and appearing as a grey bearded human of about 60 years old or so. He was around long before Middle-earth was created and before the Years of the Lamps. He, Saruman and Sauron are approximately the same age - give or take. It's difficult to pin down his true age because time had little relevance before the Lamps were set in place. 11,000 years old is a minimum figure. He's likely much older.
Like Morgan said, Gandlaf is a Maia (spirit). That means he doesn't age like normal humans do. He existed before the creation of the world. Gandalf came to middle Earth in T.A. 1000 and left at T.A 3021, so you could say that he was 2000 years on Arda.
He also can't die. This is why when he died fighting the Balrog he came back to life (to fulfill his mission -- defeating Sauron). When his mission is complete, he won't die. He will continue to exist as an ethereal Maia.
Age (as we perceive it) doesn't exist for Gandalf.
The question is essentially unanswerable. Gandalf predates the creation of the world (Arda) and even the creation of the universe (Ëa). He existed before time did, and for the first few ages of his existence (probably most of his "life"), there was no way of keeping track of time.
This question makes as little sense to a Tolkien fan as the question "How old is god?" would to a devout Christian, Jew, or Muslim. In both cases, the age is literally so great that it cannot be quantified or measured in any meaningful sense.
The best we can do is to say 'He's so old that it is impossible to say say how old he is. He's so old that years weren't invented until he was already an "old man".' The only LotR characters who are about the same age as Gandalf are Sauron, Morgoth, and Eru Ilúvatar. In The Silmarillion, all the Ainur are roughly the same age as Gandalf. In a very real way, Gandalf is older than time itself. This is impressive, but not really unique in Tolkien's world. As I said, all the Ainur (we don't know how many of them there are, but it is probably in the dozens) are as old as Gandalf.
If you're asking how long he was in Middle-earth, the answer is "roughly 2,000 years".
It is debatable whether any kind of age can be placed on Olórin, the ainu who became Gandalf. It seems that time of some sort existed in the Void where he was first created, since events progressed and changed; but at the same time, the void is also called the "Timeless Halls", and the ainur who entered the world did so "at the beginning of Time". So, from an earthly perspective, Olórin is as old as the world/universe.
Exactly how old that is in terms we would understand is unclear. The Silmarillion tells that the Valar and the Maiar laboured to build the world
in wastes unmeasured and unexplored, and in ages uncounted and forgotten, until in the Deeps of Time and in the midst of the vast halls of Eä there came to be that hour and that place where was made the habitation of the Children of Ilúvatar
So really, we can't put an age on Olórin, or any of the Valar or Maiar.
Gandalf, on the other hand, the embodied form of Olórin who walked Middle Earth to oppose Sauron...him we can date with reasonable precision.
From Appendix B of Return of the King, The Tale of Years, regarding the Third Age:
When maybe a thousand years had passed, and the first shadow had fallen on Greenwood the Great, the Istari or wizards appeared in Middle Earth. It was afterwards said that they came out of the Far West and were messengers sent to contest the power of Sauron, and to unite all those who had the will to resist him; but they were forbidden to match his power with power, or to seek to dominate Elves or Men by force and fear.
Exactly when Gandalf arrived is, as far as I have been able to find, nowhere directly stated; we know that he was the last of the Istari to arrive, and seemed the least impressive; we can assume something like the years 1000-1025 TA. He finally left Middle Earth with Bilbo and Frodo in 3021 TA, so I choose to believe he arrived in 1021 and stayed for exactly 2,000 years.
It's also worth noting that he never appeared young; none of the Istari did.
They came therefore in the shape of Men, though they were never young and aged only slowly
This 'aging' appears to have been related to the trials and difficulties they had to endure, rather than to time.
Listen closely in TFotR - Bilbo gives us a rough time frame of around the 1390s:
"1296 - very good year. Almost as old as I am!"
I'm not exactly sure of the life expectancy then, but it wasn't anywhere near 100 (due to war or illness, take your pick) - I went with 45 in my calculations and got Gandalf's age at 13'500. That isn't too far off the mark of another user's 'at least 11'000' all things considered.