MPESA Transaction Calculator : Always pay less for MPESA transactions

Recently (maybe not very recent), Safaricom started including transaction costs for all MPESA transactions  in the MPESA messages. When you do the math, the transaction costs cumulatively are not as small as you may think; the results of a back of the envelope calculation of my own transaction costs had me rushing to create a model that I could use to reduce, where possible, the costs.

I have previously created a linear programing model in excel but if I’m heading to an mpesa shop, I figure I might not have time run an excel model. So I have created a model in R and Shiny so I can access the calculator on the go. It is built on linear programming library lpsolveAPI.

Always pay less App

You can play with the app here:

The app screenshot below show as send transaction for 1050. The model suggests that you send Ksh 50 (at 0 cost), then send KShs 1000 (at cost of Kshs15), for a total savings of 10 bob in two transactions. You can play with different transaction setting to see how much you can save.


Another example, If I wanted to send Ksh 10200, the cheapest way, If I wanted to do only 3 (three) transactions would be: For sending,

1: Send Kshs 100 twice (i.e 100 * 2 = 200), then send Kshs 10,000 (which would save me Kshs 10).


1: STo withdraw Kshs 10200, I would again withdraw Kshs 100 twice (i.e 100 * 2 = 200), then withdraw Kshs 10,000 (which would save me Kshs 29).


Have Fun!!


About the author


View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *