I've used this a few times, seems to do a pretty alright job. You input the tube/pipe diameter and wall, then the angle of fit up and then it prints out a paper template so you can easily cut it out with a 4.5" grinder. You have to download the file and run it. Thought I would share.
http://www.ozhpv.org.au/shed/tubemiter.htm