Background
Muslims are required to pray five times a day in the prescribed time, they are : Shubuh, Dzuhur, Ashar, Maghrib, and Isya. As a muslim who is still learning the basics, I pray regularly but sometimes I miss one to few times. “How many times do I pray in a day?”, “Which shalat am I frequently missed?”, or “Where do I usually pray?”, these are the questions I frequently asked. Unfortunately I didn’t have the answer.
Method
I have came up with several way to measure shalat using what’s called as mental models. There are atleast 4 models if i recall correctly, starting from at some point in 2021. Back then, I didn’t do it regularly.
Recently I came up with a way to measure shalat. Each shalat is categorized into three parameters, Commitment (Committed/Abandoned), Place(Home/Mosque), and Person(Jamaah/Alone). Then, I count each category to get overview of my shalat so I can answer my question. You can find the full instruction on Github.
Think of the instruction as if you are talking to yourself.
“Assalamualaikum, did you commit shalat dzuhur?” -> Commitment
Waalaikumussalam, yes, I did. -> Committed
“Alhamdullilah, where did you pray?” -> Place
Today is raining so I pray at home. -> Home
“Did anyone else pray with you?” -> Person
I pray alone -> Alone
Then you could write it down on paper as the following :
Dzuhur : Committed, Home, Alone
And you do the same thing with the rest of shalat.
This is not the only method I use to measure shalat. I’ve had this idea as early as 2021, but at the time I only wrote the rules on paper and no surviving documents. Back then, I didn’t do I regularly either. Thus, I will demonstrate shalat measurement using the current method only.
Implementation
I wrote my shalat records on my journal. This means I need to transcribe them to the computer in order to calculate them. My goal is to analyze all of my shalat records in entire month. For the purpose of this article alone and to simplify things, I will analyze my shalat records from the five days of early december 2024 and five days of january 2025.
After that, I calculated my shalat record using Google Sheets (Forgive me Mr.Stallman). You can use any spreadsheet programs that you like, be it LibreOffice, OpenOffice, or even physical spreadsheet if you hate technology (why are you reading this?). I thought using the commandline to calculate the data, but that’ll be another article.
Open your spreadsheet program. Then, create three sheets with the following purposes :
1. Data 1 : The data of earlier days, in this case December 2024.
2. Data 2 : Data 1 : The data of later days, in this case January 2025.
3. Dashboard : The sheet where you will be doing the calculation for both data.
After that, open the Data 1 sheet or whatever you decided to name it and create the following attributes on top of the row :
- Date : The date where you committed the shalat.
- Shalat : The name of the shalat committed, shubuh, dzuhur, ashar, maghrib, isya.
- Committment : Whether you committed or abandoned the shalat.
- Person : Whether you commit the shalat alone or jamaah.
- Place : Whether you commit the shalat at mosque (and mushalla) or at home.
To make it better, you can use a drop-down menu from data validation. If you are using Google Sheets, follow this :
Data > Data Validation > Edit rule
After that, fill in the data. This is the real exercise; be honest with yourself and fill it as you did. The end result should look like this :
Calculation
Now we move on to the dashboard. The calculation will be a simple summary of each category.
Formula : =COUNTIF(December_2024!$C:$C, $A$4)
This formula will check the December 2024 data to find the data of A4 cell, Committed. Other attributes are calculated in the same way, so adjust the COUNTIF according to the data of each attribute’s range and attribute’s cell.
After that, we will calculate the percentage. It’s useful to indicate whether we fully committed to the five daily prayer.
Formula : =B4/($B$4+$B$9)
The formula divides the value of the cell in the current attribute with total value of all shalat that we are supposedly committed, which is the addition of shalat committed and shalat abandoned. Don’t forget to format the cells with percentage, and adjust the decimals accordingly.
Ideally, your shalat record should improve over the time. To make it easier to tell, I decided to make another column named ‘growth’. It’ll tell me if my records went up, went down, or stay the same. The logic goes like this :
If score after > score before, then “positive”
If score after < score before, then “negative”
else, “none
Muslim men are required to pray in the mosque, thus I highlight the cell in green to make it easier to find it.
Here is my results.
If you feel too lazy to actually make it, I have provided the template here.
Conclusion
I have demonstrated the way to measure and analyze shalat. So far I have only shown the measurement method and overview of the analysis using spreadsheet. On the next articles, I will show how to analyze the spreadsheet with commandline utilities and possible way to improve the analysis.