The nucleation of crystals has long been thought to occur through the stochastic association of ions, atoms or molecules to form critical nuclei, which will later grow out to crystals1. Only in the past decade has the awareness grown that crystallization can also proceed through the assembly of different types of building blocks2,3, including amorphous precursors4, primary particles5, prenucleation species6,7, dense liquid droplets8,9 or nanocrystals10. However, the forces that control these alternative pathways are still poorly understood. Here, we investigate the crystallization of magnetite (Fe3O4) through the formation and aggregation of primary particles and show that both the thermodynamics and the kinetics of the process can be described in terms of colloidal assembly. This model allows predicting the average crystal size at a given initial Fe concentration, thereby opening the way to the design of crystals with predefined sizes and properties.