cdetools provides tools for evaluating conditional density estimates and has applications to photometric redshift estimation and likelihood-free cosmological inference. Available in R and Python, it provides functions for computing a so-called CDE loss function for tuning and assessing the quality of individual probability density functions (PDFs) and diagnostic functions that probe the population-level performance of the PDFs.