Colloidal quantum dots (CQDs) are finding increasing applications in optoelectronic devices, such as photodetectors and solar cells, because of their high material quality, unique and attractive properties, and process flexibility without the constraints of lattice match and thermal budget. However, there is no adequate device model for colloidal quantum dot heterojunctions, and the popular Shockley-Quiesser diode model does not capture the underlying physics of CQD junctions. Here, we develop a compact, easy-to-use model for CQD devices rooted in physics. We show how quantum dot properties, QD ligand binding, and the heterointerface between quantum dots and the electron transport layer (ETL) affect device behaviors. We also show that the model can be simplified to a Shockley-like equation with analytical approximate expressions for reverse saturation current, ideality factor, and quantum efficiency. Our model agrees well with the experiment and can be used to describe and optimize CQD device performance.