How to factory reset iphone?

Hi, so I have forgotten my iPhone password and I need to do a factory reset but I do not have a computer. How would I do this? I know you can hold down the power and home buttons but does that ask to connect to computer afterwards?

How can I reset and iphone 5 without passcode or a computer?

Alright:

I don't think you can factory reset your iPhone without a passcode (IF YOU DO HAVE A PASSCODE)

But, if you don't have a passcode:

-Go to settings
-Go to General
-Go to Reset

Now there are two main options:
Reset All settings
Reset All content and settings

I'm assuming you want to 'RESET All SETTINGS'!

No my friend, you can't reset it with getting into the phone if you don't have a computer.

If you have a computer, you'd need to put it in recovery mode to restore and then sing in to your iCloud account to activate the iPhone.