Intraoperative tumor/surgical margin assessment is required to achieve higher tumor resection rate in breast-conserving surgery. Though current histology provides incomparable accuracy in margin assessment, thin tissue sectioning and the limited field of view of microscopy makes histology too time-consuming for intraoperative applications. If thick tissue, wide-field imaging can provide an acceptable assessment of tumor cells at the surface of resected tissues, an intraoperative protocol can be developed to guide the surgery and provide immediate feedback for surgeons. Topical staining of margins with cancer-targeted molecular imaging agents has the potential to provide the sensitivity needed to see microscopic cancer on a wide-field image; however, diffusion and nonspecific retention of imaging agents in thick tissue can significantly diminish tumor contrast with conventional methods. Here, we present a mathematical model to accurately simulate nonspecific retention, binding, and diffusion of imaging agents in thick tissue topical staining to guide and optimize future thick tissue staining and imaging protocol. In order to verify the accuracy and applicability of the model, diffusion profiles of cancer targeted and untargeted (control) nanoparticles at different staining times in A431 tumor xenografts were acquired for model comparison and tuning. The initial findings suggest the existence of nonspecific retention in the tissue, especially at the tissue surface. The simulator can be used to compare the effect of nonspecific retention, receptor binding and diffusion under various conditions (tissue type, imaging agent) and provides optimal staining and imaging protocols for targeted and control imaging agent.