If my client decides to discontinue a project that I am working on part-way through, or wishes to cancel work, how much should I say my client has to pay?
You should really decide this explicitly in your contract, and have a cancellation clause.
If you are offering an hourly rate for your work (rather than a fixed amount), you should ideally make this cancellation fee a large percentage of this hourly rate (if not 100%, though you could probably negotiate, or even get more, depending on how willing your client is to do this)
If you are offering (or being offered) a fixed amount, however, you should try to stick to an amount you are comfortable with; if the project was cancelled part-way through, and was a big, important project with a deadline, having it cancelled could have a huge impact on your finances. This is the case where you should really have a cancellation fee that is determined by the size and budget of the project, and it's very hard to put a concrete number on this.
If the project is smaller, you should still always seek a cancellation fee, but an idea is to keep a set amount for cancellation that your client can see in your contract, so that you know you will always get at least that amount for a project.
I concur with @Hiroto's answer, but would also add that you should consider working like a lawyer does: with a retainer. That is, your contract should reflect full payment (and if the amount is at all uncertain, then err on the higher side to protect yourself) for the project in advance, before you even begin to work on the project. Then if you finish under budget, you can refund your client the difference, which will automatically tend to make your client feel happier with your work than she would otherwise feel without a refund.
This may be a bitter pill to swallow for some or even many clients, of course, and so if you are inflexible regarding this clause of your contract, then you may not see much work. But if you have more offers for work than you really need, then I think there's no better way to handle your question than with a retainer.
I think it goes without saying that if there were a better way to handle such situations, attorneys would be using it for their own work.