We show that the cosmic birefringence and miscalibrated polarisation angles can be determined simultaneously by cosmic microwave background (CMB) experiments using the cross-correlation between E- and B-mode polarisation data. This is possible because polarisation angles of the CMB are rotated by both the cosmic birefringence and miscalibration effects,whereas those of the Galactic foreground emission only by the latter. Our method does not require prior knowledge of the E- and B-mode power spectra of the foreground emission, but uses only the knowledge of the CMB polarisation spectra. Specifically, we relate the observed EB correlation to the difference between the observed E- and B-mode spectra in the sky, and use different multipole dependence of the CMB (given by theory) and foreground spectra (with no assumption) to derive the likelihood for the miscalibration angle α and the birefringence angle β. We show that a future satellite mission similar to LiteBIRD can determine β with a precision of ten arcminutes.