In 13th Age a critical is achieved when you roll a natural 20 on a d20. The Monk class has a few features that can fundamentally change its potential to crit.
First off, a Monk using bare hands to fight is considered to be using Two-Weapon fighting. If a character who is two-weapon fighting rolls a natural 2 on an attack roll, they may reroll but must take the new result.
Second, a Monk has a resource called Ki. As a free action, a Monk can spend a Ki point to adjust their natural attack roll by one, unless that result is a natural 1. This can be a change up or down. This means that a Monk who rolls a 19 can spend a Ki to make it a 20, and a Monk who rolls a 3 can make it a 2 and trigger the re-roll from Two-Weapon Fighting. They can't adjust a natural 1 to be a 2, however.
It should also be noted that while a Monk can take a feat to be able to spend more than 1 Ki per turn, it is impossible for any Monk to spend more than 1 Ki on the same feature more than once in a turn. Therefore a Monk who rolls a 3 can spend 1 Ki to change it to a 2 and get the re-roll, but if the re-roll resulted in a 19 they couldn't then spend an additional Ki point to make it a 20.
So with all that said: Does anyone know IF this can be calculated in Anydice and if so, using what formula?
I barely know how to use Anydice beyond the basics and probability is not my strong suit.
Assumptions
Assume that the player will always reroll on a 2, since the odds of getting a higher result are so high and a 2 is often unlikely to hit. Also assume that we're working within a single turn and don't care about the chances on subsequent turns, which means we can only spend 1 Ki to adjust 1 roll once. The rules wouldn't allow us to spend any Ki to adjust the roll a second time anyhow.
Clarification
Two-Weapon Fighting isn't like advantage in D&D. You roll 1d20 for an attack and should the result of that d20 land on a 2, the player has the choice to re-roll; by doing so, they are replacing the first roll as if it never happened and are stuck with the new roll result, even if it's another 2.