The Estonia international leaves Liverpool after a two-year spell on Merseyside that included 53 appearances and two goals for the club.
Klavan joined the Reds from FC Augsburg in the summer of 2016 and played 25 times during his debut season, scoring once – in a League Cup tie at Derby County.
The centre-back featured in 28 games last term, including eight Champions League appearances as Liverpool reached the final, and claimed a memorable winning goal in stoppage-time against Burnley.
Klavan sealed the formalities of his switch to Cagliari on Friday ahead of their first game of the Serie A season, at Empoli on Sunday.
Everybody at LFC wishes Ragnar the best of luck for the future.