check out http://hybridwebdev.com/bh-calc