Got your shiny new ASIC miner? Wondering when it will pay off? If you enter your hash rate below, this page will calculate your expected earnings in both Bitcoins and dollars over various time periods (day, week, and month). It will not attempt to extrapolate difficulty or price changes -- it provides only instantaneous calculations (how much you'd make if all conditions remained as they were right now).
An API is available at https://alloscomp.com/bitcoin/calculator/json.