It's completely depends on you ! if you like to see Hampi slowly by enjoying the different views and spending time peacefully by looking to beautiful architecture it might take more time . If your are planning to just "visit" you can do it in 2 days ..