If you don't get paid per hour (which is what I prefer, changing specs can take plenty of time) you can guess how much time it will cost you to build. But an other method is the see how much money the app makes for your client and take a fair part of that.
A simple app, created in a few hours, that generate a lot of turnover of worth more for a client as a complicated app that took many hours to create but doesn't create any turnover...