The poster presents the recent measurement of $\sin(2\beta)$ using $B^0$ decays to the $J/\!\psi K_\text{S}$ final state. The measurement is based on a dataset corresponding to an integrated luminosity of 3.0$\,\text{fb}^{-1}$ collected with the LHCb experiment in proton-proton collisions at center-of-mass energies of 7 and 8 TeV. To control penguin pollutions in the determination of $\sin(2\beta)$, $B_s^0$ decays to the same final state can be analysed. The results of the corresponding analysis are presented as well.