The Standard Model of the elementary particles (SM) describes the quark mixing using the Cabibbo-Kobayashi-Maskawa (CKM) matrix. Elements of this matrix can be constrained using the experimental results combined with theoretical calculations. With new analyses of the full Run 1 dataset performed by the LHC experiments, in particular LHCb, the CKM picture can be tested with great precision, and very precise SM predictions can be obtained from global analyses. We present here the results of the latest global SM analysis performed by the UTfit collaboration. We also present an update of the UT analysis beyond the SM. An extensive study of the CKM angle gamma is also presented.