Llewelyn James, now 22, is likely to spend the rest of his life behind bars. He will not be eligible for parole for more than 250 years.
Relatives of his victims clapped when they heard the sentence, the Philadelphia Inquirer reported.
"The defendant acted with an evil far beyond his years," Superior Court Judge Thomas Brown said.
James killed his aunt, her boyfriend and two other people who were smoking crack in the house where he lived with other family members in West Atco, a rural area southeast of Camden and Philadelphia. The next day he shot and wounded a marijuana dealer in an unsuccessful robbery and killed two men he encountered as he left.
His lawyer said that James has asked him to appeal his conviction.
Millions of Getty images now available for free via embed tool
Boston schools pull out free condoms over wrapping complaints