How much could I afford with a mortgage?

I'm currently in rented and I'm looking to move. I would like a look at the option of buying within the next year so looking at renting and buying but mainly would like to know how to find out how much I could afford.