Uses "ATTEMPTS" to control the number of tests the program runs to find a Shiny Pokemon in an SOS chain. Use "CharmOwned?" to change the catch rate depending on whether or not you have a Shiny Charm. If you use a large number of attempts (as in larger than 1000), hold Shift and click the flag to make the program run faster. It helps. A lot.
This is a calculator that calculates the average number of encounters needed in an SOS Chain to catch a Shiny Pokémon. If you don't understand what this means, then it probably doesn't concern you. DISCLAIMER: The variable, "% of Shiny Encounters" does not show your catch rate, rather it shows the likelihood of catching a Shiny Pokémon in an SOS chain (between 70-255 encounters, after that the chain resets to 1).