The main idea in O. Henry's "The Gift of the Magi" is in the idea that the value of a gift comes not in its actual cost, but from giving from the heart. While the narrator of the story calls Jim and Della "not wise," he goes on to call them "the most wise" before comparing them to the Magi, who "Being wise, their gifts were doubtless wise one."
The narrator calls Della and Jim "the most wise" for each giving up their most valuable items for each other even though giving up their most precious possession ruined one another's gift. In the story, "a tear or two ran down her face" when Della decides to cut off her hair to make $20 for her husband's gift, a gold chain for his watch, his most precious possession. Ironically, if not surprisingly, Jim has sold his watch to buy combs for his wife's most precious possession, her hair.
Throughout the story, the narrator breaks from his third-person persona and seems to speak directly to the audience in order to editorialize why these gifts are precious and to explain the story's main idea. After Jim finds out about Della's hair, the narrator posits:
"Eight dollars a week or a million dollars a year— how different are they? Someone may give you an answer, but it will be wrong. The magi brought valuable gifts, but that was not among them. My meaning will be explained soon."
The narrator goes on to explain the main idea of this story succinctly: "Each sold the most valuable thing he owned in order to buy a gift for the other."
The main idea of "The Gift of the Magi" is that the value of a gift is in the giver, rather than the gift itself. Jim and Della, out of their love for each other, purchased a gift that required them to sacrifice something that was precious to them. Though that sacrifice thus made the gifts impractical, nevertheless they showed themselves to be understanding of true giving, true sacrifice, and true love. As Henry says, "Of all who give and receive gifts, tsuch as they are wises. Everywhere they are wisest. They are the magi."