Pharmacokinetic models typically rely on a key assumption that patients take their medication as prescribed, whereas this is often not the case. We present a branch and bound algorithm that can be used to estimate the time-varying probability that, given a specified pattern of nonadherence to a prescribed regimen, a patient receives no therapeutic benefit from treatment. Use of this algorithm is a much faster method for obtaining this probability than exhaustive computation of the relevant probability distribution. The use of this algorithm to assess, in quantitative terms, the impact of non-adherence on the effectiveness of treatment provides a rational basis for evaluating the potential harm to patients.