“The Gift of the Magi” appears in O. Henry’s short story collection, The Four Million, published in 1906. The collection’s title refers to the then-population of New York City and is a comical take-off on “The Four Hundred,” the collective name given to the elite of Gilded Age society in New York (that supposedly represented the capacity of ultra-rich guests that would fit in Caroline Schermerhorn Astor's ballroom). In stark contrast to the lifestyles of the rich and famous “The Four Hundred,” the stories in The Four Million depict the lives of everyday New Yorkers in the early 1900s, whom O. Henry lived among and celebrated. Though “The Gift of the Magi,” does not explicitly state it, Jim and Della live in this New York City setting. Their clothes, the lack of widespread electricity, and the colloquial dialogue all support the setting. 

The dynamic between Della and Jim also reflects stereotypical gender roles of the time. Jim is expected to work and provide for his family, while Della is expected to keep the house running smoothly. Della is also depicted as emotional and capricious, while Jim is strong and comforting. The suffrage movement was underway, but women would not have the right to vote in the United States until 1920, about fifteen years after the story takes place. Although the couple struggles financially, the author does not mention its cause or relate it to wider current events of the time. This period in American history is generally considered one of economic expansion and prosperity; however, there was widespread inequality in major cities like New York, and the experiences of working class people such as Della and Jim would have varied drastically.