There is no specific formula you can follow to rank #1 on Google and there is no set time frame. You may optimize your website for years and never attain top rankings. In order to rank number one on Google, your webpage must be the best option for a particular searcher.