Use string functions and arithmetic calculations in SQL query or by programming language?
If you're going to bring the same amount of rows from the database anyway, then you had better perform your mathematical functions in your application, not in your database. Math calculations in SQL are notoriously slow.

Also note that this takes computation from a single database server into possibly multiple PHP front ends. Sure, you might also spread the load over multiple MySQL replication servers; generally speaking, you will have more PHP front ends than MySQL back ends.