"If—" first appeared in the "Brother Square Toes" chapter of the book Rewards and Fairies, a collection of Kipling's poetry and short-story fiction, published in 1910. In his posthumously published autobiography, Something of Myself (1937), Kipling said that, in writing the poem, he was inspired by the character of Leander Starr Jameson, leader of the failed Jameson Raid against the Transvaal Republic to overthrow the Boer Government of Paul Kruger. The failure of that mercenary coup d’état aggravated the political tensions between Great Britain and the Boers, which led to the Second Boer War (1899–1902).
As an evocation of Victorian-era stoicism—the "stiff upper lip" self-discipline, which popular culture rendered into a British national virtue and character trait, "If—" remains a cultural touchstone. The British cultural-artefact status of the poem is evidenced by the parodies of the poem, and by its popularity among Britons.
In India, a framed copy of the poem was affixed to the wall before the study desk in the cabins of the officer cadets at the National Defence Academy at Pune, and Indian Naval Academy at Ezhimala.
In Britain, the third and fourth lines of the second stanza of the poem: "If you can meet with Triumph and Disaster / and treat those two impostors just the same" are written on the wall of the players' entrance to the Centre Court at the All England Lawn Tennis and Croquet Club, where the Wimbledon Championships are held. (These same lines appear at the West Side Tennis Club in Forest Hills, New York, where the US Open was played.) The first verse is set, in granite setts, into the pavement of the promenade in Westward Ho! in Devon.
The Indian writer Khushwant Singh considered the poem "the essence of the message of The Gita in English."
In popular culture
In 1914 the New Zealand School Journal published the poem without asking permission following the outbreak of World War I. The Education Department wrote to the publishers and offered to pay a "reasonable fee". Kipling, who routinely turned down requests to publish "If—", asked for £50 to settle the matter. The Solicitor-General said that the Crown was not bound by the New Zealand Copyright Act of 1913, and could reprint the whole of Kipling's works if it chose.
There is a classical translation in French by André Maurois, who was an interpreter with the British Army during the First World War. It was published in Les silences du colonel Bramble (1921), chap. XIV (Collection Poche, pp. 93s.). In Portuguese, the most widely-circulated translation is by Félix Bermudes.
On 21 September 1938 the Czech journal Přítomnost published the poem in the place of editorial (as a reaction on the situation before the Munich dictate).
The cab driver character Alex (Judd Hirsch) begins the poem and it is finished by the unlikely character Jim (Christopher Lloyd) in season 2 episode 22 of the television show Taxi.
In Apocalypse Now, when the photojournalist played by Dennis Hopper meets Capt Willard, played by Martin Sheen, he spouts a few lines of the first stanza during his drug-fueled, frenzied greeting while trying to relay how much he admires Colonel Kurtz.
In The Simpsons, Grandpa Simpson quotes an abbreviated portion in "Old Money" as justification to betting all the winnings of a recent inheritance at roulette.
Reebok produced a shoe commercial in 1993 featuring Basketball Hall of Famers Wilt Chamberlain, Kareem Abdul-Jabbar, Bill Russell, Willis Reed, Bill Walton, and John Wooden reciting "If—" to then-NBA rookie Shaquille O'Neal.
The book by David Weber “March Upcountry” references this poem. (2001)
The fictional character Bridget Jones is powerfully struck by "If—": "Poem is good. Very good, almost like self-help book".
Brand New adapted part of the second stanza of the poem for the lyrics of their 2006 song "Sowing Season".
The first lines of the poem are used as a password in the 2015 film Mission: Impossible – Rogue Nation.
In 2016, the Boston Red Sox used the poem in a short video tribute to retiring player David Ortiz, narrated by Kevin Spacey.
Tennis player Serena Williams recited a version of the poem for International Women’s Day 2017, substituting 'woman' for 'man'.