What is the formula for how long a capacitor can power a circuit
The formula is 

$$ t = C \frac{\Delta V}{I}$$

where \$t\$ is the time, \$C\$ is the capacitance in farads, \$\Delta V\$ is the maximum change in capacitor voltage that you can allow, and \$I\$ is the amount of current drawn from the capacitor.

Yes, the capacitor voltage will fall as current is drawn from it, so you must initially charge the capacitor to a higher voltage than you need and then draw current from it until it reaches the lowest voltage you can still use.