The objective of this randomized study is to evaluate the accuracy of a new demographic/pharmacogenetic as compared to usual warfarin dosing algorithm in predicting warfarin maintenance dose. In patients with atrial fibrillation starting anticoagulation, the loading dose of warfarin in the tested group is calculated on the basis of VKORC1 genotype and patient's body weight.The second day warfarin maintenance dose is calculated on the basis of surface area and CYP2C9, CYP4F2 e VKORC1 genotype. In the usual care group the maintenance dose at day 5 is calculated on the basis of a published algorithm (Pengo V, Am J Cardiol 2001). INR is checked on day 0, 5, 7, 9, 12, 15 and 19. Primary end-point of the trial is the number of INR outside the therapeutic range of 2.0 to 3.0. Secondary end-points are the number of changes in dose prescription, the difference between predicted and actual warfarin maintenance dose and thrombotic and bleeding events.