It seems to me that the easiest way is to use a special calculator for this. I know that if you go to this site you will find there a special program that can accurately calculate the cost of your essay. This is a good way for students not to overpay for such services, in addition, if you decide to write an essay for your friend or help some junior students in this, you can tell him an honest price and get a decent payment for your work.