Reducing measurement errors in multiqubit quantum devices is critical for performing any quantum algorithm. Here we show how to mitigate measurement errors by a classical postprocessing of the measured outcomes. Our techniques apply to any experiment where measurement outcomes are used for computing expected values of observables. Two error-mitigation schemes are presented based on tensor product and correlated Markovian noise models. Error rates parametrizing these noise models can be extracted from the measurement calibration data using a simple formula. Error mitigation is achieved by applying the inverse noise matrix to a probability vector that represents the outcomes of a noisy measurement. The error-mitigation overhead, including the number of measurements and the cost of the classical postprocessing, is exponential in ϵn, where ϵ is the maximum error rate and n is the number of qubits. We report experimental demonstration of our error-mitigation methods on IBM Quantum devices using stabilizer measurements for graph states with n≤12 qubits and entangled 20-qubit states generated by low-depth random Clifford circuits.