An employee of the credit card company Nets was also convicted.
Leaks provided by IT expert Peter Bo Henriksen to the Se og Hor weekly magazine enabled it to report a series of royal family and celebrity stories, to the bafflement of its rivals.
The case has attracted huge public interest in Denmark.
Judge Mette Lyster Knudsen sentenced Mr Henriksen - who used to work for Nets - to 18 months in jail for selling information between 2008 and 2012 that detailed the location of major public figures including Prime Minister Lars Lokke Rasmussen and actor Mads Mikkelsen.
Former Se og Hor editor Henrik Qvortrup was also sentenced to 18 months in jail, of which 12 were converted into 200 hours' community service.
Three other Se og Hor journalists were given suspended sentences, while another was acquitted.
All have since left the weekly, which has one of the biggest circulations in Denmark.
Among the stories reported by the magazine were details about the honeymoon of Prince Joachim and his wife in Canada in 2008, after it bought information about their itinerary from Nets.
The media group that owns the magazine was fined $1.52m (Â£1.22m) last year for wrongfully monitoring more than 120 celebrities. Two former senior staff members were given suspended sentences.
One of the celebrities who fell victim to the magazine, Rene Dif of the Danish-Norwegian music group Aqua, criticised the sentences on Thursday. "These short sentences shows how ridiculous the Danish justice system is," he told Danish TV.
The four journalists have said they are considering an appeal against the verdict.
Four Danish journalists have been found guilty of paying for credit card information to track politicians, celebrities and royal family members.