How to calculate pot odds
Add the bet to the pot, then compare it with what you have to call. With 100 in the pot and a bet of 50, the pot is 150 and your call makes it 200. You pay 50 to win 150, which is 3 to 1. As a percentage, divide the call by the final pot: 50 ÷ 200 is 25%, so the call breaks even if you win a quarter of the time.
The bigger the bet, the more often you need to win. A third of the pot needs 20%, half the pot 25%, the whole pot 33%, and an overbet of twice the pot 40%.
A worked example with a draw
You hold a flush draw on the flop: 9 with two cards to come, which hit 35% of the time. Against a half-pot bet that puts you all in you need 25%, so the call pays on its own. On the turn, one card is left and the same 9 outs hit only 19.6%. Now the call loses money by itself and is right only if you win enough more when the flush comes in. The calculator shows that amount.
The rule of 2 and 4
A quick estimate: multiply your outs by 4 on the flop and by 2 on the turn. It runs a little high with many outs, so the calculator shows it beside the exact chance. For the chance of each draw on a real board, try the outs calculator, and for equity against a hand or a range, the poker odds calculator. The formulas are on the poker math page.