In Paulo Coelho's novel The Alchemist, it can often times be misleading in trying to ascertain the age of Santiago for he is often times referred to as "the boy." There are probably several reasons for this. Quite literally in his culture, he may be considered a boy because he has not chosen a "fixed" career and married. He may not have taken on the responsibilities of a grown man in having a plan for his life. He is much like a child still filled with dreams and a desire not to settle down (though as the story progresses, he isexperiencing the first desires to stay in one place, with a merchant's daughter). For the sake of the novel, he has not yet determined his Personal Legend; at the beginning of the novel, he does not even know there is such a thing. So the sense that he is a boy simply may indicate that in terms of searching out his destiny, Santiago has not yet begun his journey.
As with most stories, we learn about our main characters at the beginning of the novel, where we begin to form our initial impressions. As with many first impressions, these perceptions will remain with the reader and should be "in sync" with what the character does: this is certainly the case with Santiago.
We meet a young "man" who knows what he does not want, and vaguely what he does want: he does not want to join the church as his family would have him do. He does want to travel (and has since he was a small boy), and logically decides that shepherding would provide him with this opportunity. And in keeping with this persona, he comes to love and know his sheep, care for them and appreciate them. He is a good person.
When the story begins, Santiago has found a ruined church, and it is here that we learn that he provides shelter for his sheep and accounts for each one—he will even search the entire next day if one sheep wanders away. (It his here that we see Santiago presented as a Christ-like figure.)
When the boy wakens, we learn several things: he is a "serious" reader, so we can assume that he is relatively smart. He has had "the recurring dream" again, he is aware of an undefined energy that he shares with his sheep and he has been with his sheep for two years.
It was as if some mysterious energy bound his life to that of the sheep, with whom he had spent the past two years...
Again, later, the boy thinks of the two years he has traveled the "Andalusian terrain." And immediately thereafter, he reveals his age:
He was planning, on this visit, to explain to the girl how it was that a simple shepherd knew how to read. That he had attended a seminary until he was sixteen...
So we know he is at least eighteen, though he might be a littleolder.
Ironically, Santiago thinks to himself...
But ever since he had been a child, he had wanted to know the world, and this was much more important to him than knowing God...
As the story progresses—after he meets Melchizedek and crosses the desert to the oasis where he will meet Fatima—he will encounter the alchemist who will boast of Santiago's ability to change himself into the wind, and here Santiago will meet God.
Though he is referred to as a boy, it is only because he has not been tried by the world and found his Personal Legend that he is not considered a man. By the novel's end, this is not the case.
Page eight offers the reader a glimpse into Santiago's past:
"His purpose in life was to travel, and, after two years of walking the Andalusian terrain, he knew all the cities of the region. . . That he had attended a seminary school until he was sixteen. . .But ever since he had been a child, he had wanted to know the world, and . . . One afternoon, on a visit to his family, he had summoned up the courage to tell his father that he didn't want to become a priest. That he wanted to travel."
this quote indicates that Santiago is 18 at the beginning of the novel.
From the moment he meets the King of Salem until he begins working for the crystal salesman no more than a week has passed. He works for the salesman for "eleven months and nine days" (60). For the rest of the novel the time period is not explicit, but Santiago has to cross the Sahara, then back again. This type of journey on camel-back would have taken months. It seems as if the entire tale takes place in a span of roughly 2 years, so by the end Santiago is probably about 20 years old.
As for the time period, Coelho seemingly attempts to create a "timelessness" for his story, but cultural clues, and the emphasis on alchemy might indicate the Middle Ages; however, the exact historical period isn't that relevant to the larger themes of the story.