Change from 2 chain rings to single chain ring on a MTB. What size should I take?
Currently the gear ratio of your lowest gear is:

26/40 = 0.65

The Shimano XT cassette with the largest range is 11-46.
To get the same lowest gear with this cassette you would need an chain ring with 46*0.65 = 29.9 teeth

You would need a 11-46 cassette and an chain ring with 30 teeth to get the same lowest gear with an 1x setup.

But your highest gear will be lower.
At the moment the gear ratio of your highest gear is:

36/11 = 3.27

With the setup from above it would be:

30/11 = 2.73

This is approximately the same ration as the second largest gear you have at the moment with

36/13 = 2.77