This study investigates the effects of cloud condensation nuclei (CCN) and ice nuclei (IN) on ice formation in mixed-phase clouds using an adiabatic parcel model. The simulations with lower updrafts represent mixed-phase stratiform clouds, and those with higher updrafts represent deep convective clouds. Increasing CCN concentration can lead to more ice crystals with smaller sizes, but does not affect the height of freezing nucleation at lower updrafts. At higher updrafts, ice number concentration is more sensitive to CCN, and CCN effect on ice nucleation height is also more noticeable. This study also investigates the effects of IN properties (number concentration, size, contact angle) on ice formation assuming the immersion freezing mechanism. At very low IN number concentration, ice nucleation is dominated by homogeneous freezing and ice number concentration is relatively high. As IN number concentration is increased, ice number concentration decreases because both heterogeneous and homogeneous freezing processes occur. A mixed-phase layer extends up to the height for homogeneous freezing and there is a competition between the two freezing processes. As IN number concentration is further increased, ice number concentration increases because heterogeneous freezing dominates ice nucleation. IN number concentration needs to be higher for heterogeneous freezing to dominate ice nucleation at higher updrafts and lower at lower updrafts. Increasing IN size and contact coefficient also increases the contribution of heterogeneous freezing to ice nucleation. Finally, spheroids are used to represent columnar and plate-like ice crystals. CCN and IN effects are not dependent on the assumption of ice crystal shapes.