Determining the appropriate dosage involves several factors, such as the pharmacokinetics and pharmacodynamics of a substance, the patient's age, weight, liver and kidney function, and the presence of other health conditions. Toxicologists also consider the therapeutic index, which is the ratio between the toxic dose and the therapeutic dose of a drug, to ensure safety and efficacy.