Although different approaches to model a polarimeter’s accuracy have been described before, a complete error budgeting tool for polarimetric systems has not been yet developed. Based on the framework introduced by Keller & Snik, in 2009, we have developed the M&m’s code as a first attempt to obtain a generic tool to model the performance and accuracy of a given polarimeter, including all the potential error contributions and their dependencies on physical parameters. The main goal of the code is to provide insight on the combined influence of many polarization errors on the polarimetric accuracy of any polarimetric instrument. In this work we present the mathematics and physics based on which the code is developed as well as its general structure and operational scheme. Discussion of the advantages of the M&m’s approach to error budgeting and polarimetric performance simulation is carried out and a brief outlook of further development of the code is also given.