High variability in drug response and a narrow therapeutic index complicate warfarin therapy initiation. No existing algorithm provides recommendations on refining the initial warfarin dose based on genetic variables, clinical data, and international normalized ratio (INR) values. Our goal was to develop such an algorithm. We studied 92 patients undergoing primary or revision total hip or knee replacement. From each patient we collected a blood sample, clinical variables, current medications, and preoperative and postoperative laboratory values. We genotyped for polymorphisms in the cytochrome P450 (CYP) 2C9 and vitamin K epoxide reductase (VKORC1) genes. Using stepwise regression, we developed a model for refining the warfarin dose after the third warfarin dose. The algorithm explained four fifths of the variability in therapeutic dose (R(2)(adj) of 79%). Significant (P > .05) predictors were INR value after 3 doses (47% reduction per 0.25-unit rise), first warfarin dose (+7% per 1 mg), CYP2C9*3 and CYP2C9*2 genotype (-38% and -17% per allele), estimated blood loss (interacting with INR(3)), smoking status (+20% in current smokers), and VKORC1 (-11% per copy of haplotype A). If validated, this model should provide a safer, more effective process for initiating warfarin therapy.