"When I Was Your Man" is a song recorded by American singer-songwriter Bruno Mars for his second studio album, Unorthodox Jukebox (2012). Atlantic Records released the song as the third promotional single and as the second official single, taken from the album, to mainstream radio in the United States on January 15, 2013. "When I Was Your Man" was written by Andrew Wyatt, Bruno Mars, Philip Lawrence and Ari Levine; with Mars, Lawrence and Levine credited for composing the song as well.
"When I Was Your Man" is a soul and pop piano ballad. The lyrics describe a pre-fame heartbreak as he regrets a girl that he let get away, expressing his earnest hope that her new man is giving her all the love and attention. It only features piano as instrumentation. "When I Was Your Man" received mostly positive reviews from music critics, who praised Mars' vocals and named it a "vulnerable and emotional ballad". The song was nominated for Best Pop Solo Performance at the 56th Annual Grammy Awards. It won "Favorite Hit" at the 2013 Premios Juventud. "When I Was Your Man" topped the single chart of the US Billboard Hot 100, and reached the top ten on the singles chart of Australia, Canada, Denmark, France, Ireland, Netherlands, New Zealand, Norway, South Korea and the United Kingdom. It was certified quadruple-platinum in Australia and in the US, while in Canada was certified triple-platinum. Worldwide, it was the eighth best selling digital single of 2013 with sales of 8.3 million copies, being among some of the best-selling singles worldwide.