Why you need to run the other code on focus of the textbox.
It may create the problem wherever you make cursor or tab on textbox it will execute the server code but same time focus on the textbox will Get lost. Again if you try to type on same textbox it will execute the same server method again your cursor position will get lost.
You can try it on lost focus so once you enter the rate you can calculate or run other part as that time you need to focus on same textbox.