Let's say I have a clever algorithm worth patenting, how much would I have to pay in which region?
Also interesting to know: What time periods are covered?
First of all - there are different way to apply for an patent. First you can apply for an national patent in your own country. Then up to one year you can extend the application to PCT or if you are in Europe to an European application. The first application covers 3 years - after that you are enforced to pay on a year-by-year base to retain your claims.
Is there a fixed rate pay or does it depend on the patent's topic?
It depends on the countries u apply for the patent.
So, for Germany, how much?
First application - depends on how u apply - starts by 30€
Well the real cost here is not the handling fee itself. It is paying the patent lawyer to write or edit a proper patent application that is as broad as possible and as narrow as necessary while still being enforcable. I have yet to see someone report total costs in die 4digit euro-range...