I've started using org-habit this week. I can set my habits and see the nice colored consistency graph to track visually my habits.

However, I would like to have a numeric record of this. For example, something for each habit, I am imagining something like the statistics cookies:

Number of repetitions done / Number of repetitions scheduled 
Percent of repetitions done %

Or even better, have some stats about how many repetitions I have done a habit in a row.

This answer solves the issue with a capture template in a table, but I was wondering if it's possible to do it directly with the org-habit module.


1 Answer 1


This is a partial solution for the problem.

  1. Download this file into your private config: https://gitlab.com/OlMon/org-habit-report/-/blob/master/org-habit-report.el

  2. Load the file with something like (load-file "org-habit-report.el")

  3. In the file you need to track your habits, add this dynamic table (change tstart and tend to any range you want)

#+BEGIN: ol/habit-report :tstart "<2021-12-26 Sun>" :tend "<2022-02-28 Mon>" :scope file
  1. Finally, C-c C-c to update the table. It should show all your habits with some stats, for example:
#+BEGIN: ol/habit-report :tstart "<2020-12-16 Wed>" :tend "<2021-01-31 Sun>" :scope file
#+CAPTION: Habit report from 16-12-20 to 31-01-21
| Heading  | Done Count | Missed Count | Last Missed      | Longest Streak (days) | Longest Streak (done) | Currently longest |
| Jogging1 |         23 |            3 | <2021-01-30 Sat> |                    25 |                    10 | nil               |
| Jogging2 |         23 |            3 | <2021-01-30 Sat> |                    25 |                    10 | nil               |
| Workout  |         10 |            0 | nil              |                    48 |                    10 | t                 |
  • Link-only answers are discouraged (the link disappears and the answer becomes completely useless). Can you add some details about how to use the package? Thx!
    – NickD
    Commented Jan 27, 2022 at 2:51
  • Thanks! I edited the answer to explain better the workflow with this code. Commented Jan 27, 2022 at 21:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.