MaxPain:
Calculated based on Open Interest for all Calls and Puts of a given expiration date for different stock prices at expiration.
Open Interested gets updated only once a day after hours.
No other data go into the calculation. If you can download the complete Options Chain for all dates you can calculate it easily in excel etc.
Here is a graph based on yesterday's Option Chain data (in my case from Fidelity's Option Trader Pro).
It shows MaxPain strikes for all expiration dates grouped by type of expiration (quarterly, monthly, weekly) on the right hand vertical axis.
The green bars measured on the left hand vertical axis show the minimum amount of $ to be paid out in Millions.
My interpretation:
MaxPain in a rapidly moving stock like TSLA shows first of all when the options for that expiration were predominantly written. That is why quarterly points are lower than monthly which in turn are much lower than weekly ones. Outliers to the upside are expiration dates which only recently started trading (e.g. March 2022). To repeat: MaxPain of future dates reflects history - not the future of what will happen!
MaxPain in the current week will at least at the first few days of the week rapidly change from day to day to catch up with the stock-price. Later in the week the pressure, temptations, and incentives for the MM get higher to manipulate the stock instead of hedging and on expiration day there are pinning dynamics in play.
Payout are highest for the next Leap, quarterly, and monthly. Once we get close to one of these (like this week) the next one in that group will raise (people rolling out into the next expiration). So the March monthly payout is already higher than the February monthly.
Hope this helps people understand the concept and limitations better.