Ranbir Kapoor was born on 28 September 1982 in Bombay to Rishi Kapoor and Neetu Singh, both actors in Hindi cinema. He is the great-grandson of Prithviraj Kapoor and the grandson of actor-director Raj Kapoor. His elder sister, Riddhima Kapoor Sahni (born 1980), is an interior and fashion designer. Kapoor is of Punjabi descent on both sides, born to a Hindu father and a Sikh mother. He grew up in a secular environment. He was educated at the Bombay Scottish School, Mahim. The actor Randhir Kapoor is his paternal uncle, and his daughters, actresses Karisma Kapoor and Kareena Kapoor, are his paternal first cousins.
Kapoor has been vocal about how his parents' troubled marriage affected him as a child: "Sometimes the fights would get really bad. I would be sitting on the steps, my head between my knees, till five or six in the morning, waiting for them to stop". These experiences led to a "reservoir of emotions building up inside [him]", which he said compelled him to develop an interest in film. In his early years, Kapoor was close to his mother but had a dysfunctional relationship with his father. After completing his tenth standard examinations, he worked as an assistant director to his father on the film Aa Ab Laut Chalen (1999), during which he developed a closer bond with him.
After completing his pre-university education at the H.R. College of Commerce and Economics, Kapoor relocated to New York City to learn filmmaking at the School of Visual Arts and subsequently pursued method acting at the Lee Strasberg Theatre and Film Institute. In film school, Kapoor directed and starred in two short films, entitled Passion to Love and India 1964. The loneliness of living alone in New York City coupled with his experience in film school, which he described as "useless", inspired him to pursue a career in Hindi cinema. Upon returning to Mumbai, Kapoor was hired as an assistant director to Sanjay Leela Bhansali on the 2005 film Black. He described the experience: "I was getting beaten up, abused, doing everything from cleaning the floor to fixing the lights from 7 a.m. to 4 a.m., but I was learning every day." He later remarked that his motive for working on Black was to get Bhansali to offer him an acting job.