A mathematical model of the magnetic field, which is generated by negative charges located on the outer side of the red blood cell (RBC) membrane, has been constructed. When modeling, the geometric (area, volume) and physical (speed, number of revolutions per second, charge, number of charges on the membrane) characteristics of a red blood cell in a narrow capillary are taken into account. Computer calculations made it possible to find the magnetic field strength near a single RBC rolling along a narrow capillary. Calculations were also carried out to determine the magnetic field strength in the vicinity of a capillary through which several RBCs move. The dependence of the maximum magnetic field strength on the distances between RBCs (hematocrit) was found. In particular, it is shown that at distances from the capillary equal to 8 capillary diameters, the maximum magnetic field intensity changes on average by 1.3 times with an increase in hematocrit by 1.5 times (from 12.27% to 18.25%).