Despite its importance to multiple scientific fields and industries, the freezing process of aqueous solutions is not yet completely understood. In particular, the relationship between temperature gradients within a solution and the occurrence of stochastic ice nucleation remains elusive. To address this knowledge gap, we have derived a novel stochastic spatial freezing model from first principles. The model predicts with quantitative accuracy how temperature gradients affect the stochastic ice nucleation of sucrose solutions in vials. This motivated a detailed study of the freezing-stage in freeze-drying. In particular, the model enabled a mechanistic assessment of vacuum-induced surface freezing, an emerging approach towards optimized freeze-drying processes. Model predictions revealed both the stochastic nature of this freezing method, and its performance limitations in case highly concentrated solutions are frozen. To ensure that both researchers and practitioners benefit from this modeling work, we provide open source access to it within our python package ethz-snow.