Calculating total "on row" bytes for each row ... the easy way
How can we access that algorithm directly?


In so far as the answer to this question, specifically, you can't access it directly. There is nothing where you can say SELECT GetMeMaxRowSize(MyTable, MyPartition, MyIndex).

However, as LowlyDBA has pointed out, you can use sys.dm_db_index_physical_stats to give you more information than ShowContig. The quite interesting thing is that if you run DBCC SHOWCONTIG(), capturing deprecated information, you should see a message to use the aforementioned DMV in place of the ShowContig command.