Since a Melanistic Pokemon occurs when a Pokemon is both Albino and Shiny, we can conclude that Melanistic odds are equal to Shiny odds * Albino odds.
Shiny odds at a 40 chain (with Hypermode) are 1/200. For non-Hypermode users, chains will max at 39, or 1/400.
Albino odds at level 7 (full charge) are 1/180.
Long Chain bonus scaling can be found here, or directly on your Shiny Hunting page.
Shiny Charm is a 2.5x modifier to Shiny odds.
Z-Crystal is a 1.5x modifier to Albino odds.
Type Race albino boost is a 1.2x modifier to Albino odds. (Source)
PoTD increases Shiny odds by 10%.
Sei Power's impact on Shiny odds can be calculated as odds = 1/(sqrt(X) * sqrt(50-S)), where X is your initial shiny odds and S is Sei power. It can range from 5 to 25 on Sei days. (Source)
Note that you are not guaranteed a Melan within the calculated odds! This is just the odds for any specific egg to be Melanistic, and your actual luck may be better or worse thanks to RNG.