At the moment, Ethereum does not support models where the transactions would be paid by someone else.
Some smart contract based wallets like Pillar and Argent has built complex infrastructure to address this problem. The wallet itself is a smart contract that can do the action that user has signed with his or her key. However the transaction ETH gas cost is ...
If all of these variables are the same then the cost is the same:
contract code (including all contracts which are referenced)
used gas price
In a test network you probably use at least a lower gas price so you lose less Ethers for transaction costs.
I don't think number division is very expensive in Solidity, but not sure. Depending on your needs, I would be probably more worried about the precision: as there are no floating point numbers in Solidity a division is bound to lose some precision.
In any case, if at all possible, do it off-chain. Basically you should always do everything off-chain unless ...