We test the effects of magnetic fields on the mass determination of galaxy
clusters with the X-ray method. As this method takes into account only ther
mal pressure, additional non-thermal pressure support, e.g. caused by a mag
netic field, can result in an underestimation of the mass. SPH models of ga
laxy clusters including magnetic fields of various strengths in two differe
nt cosmologies are used for the test. We compare the true mass of the model
clusters with the mass determined from simulated X-ray images of the same
models. The effect of the magnetic field on the mass in relaxed clusters is
found to be negligible compared to other uncertainties, even at small radi
i, where the strongest effects are expected. However in one model, in which
the cluster is in the process of merging, we find an effect of up to a fac
tor of 2 caused by the magnetic field. In relaxed clusters the mass estimat
e, averaged over many models, is at most 15% smaller in models with relativ
ely high magnetic field of 2 muG compared to models without a magnetic fiel
d with a small dependence on the cosmology chosen. Therefore we conclude th
at the presence of a magnetic field cannot be responsible for the discrepan
cies of a factor of 2-3 found between X-ray and lensing mass in the central
regions of relaxed clusters.