In this paper, using a three-dimensional multispecies MHD model, we study the effect of the interplanetary magnetic field (IMF) intensity and orientation on the subsolar standoff distance of the Martian magnetic pileup boundary (r
0) and the pressure balance across it. The results show that: (1) with the increasing magnitude of the Y- or Z-component of the IMF, B
Y
or B
Z
, r
0 increases, while the radial IMF component, B
X
, has little effect. With the increasing magnitude of B
Y
or B
Z
, the compression degree of the magnetic field (f) increases, while the solar wind pressure coefficient (k) remains unchanged, resulting in the enhancement of r
0. (2) Under the same IMF intensity, B
t
, the impact of the IMF cone angle on r
0 and f is controlled by the ratio of the IMF Y- and Z-components to B
t
,
B
Y
2
+
B
Z
2
/
B
t
. When the ratio is enhanced, both r
0 and f increase, while k generally remains unchanged. Compared with the IMF cone angle, the influence of the IMF clock angle is relatively less. We suggest that the stronger magnetic pileup process controlled by the perpendicular IMFs (B
Y
or B
Z
) causes the larger r
0, while the weaker magnetic pileup under the radial IMF leads to the smaller r
0. The difference in the IMF effect on the size of the Martian magnetic pileup boundary and the terrestrial magnetopause reveals different solar wind interactions with a magnetized and unmagnetized planet. Last, the location of the intense crustal field can also affect r
0 and the pressure balance condition, and the specific impact needs to be further studied.