Sorry, no easy answer here. Mtb sizing can be challenging, especially if shopping for used bikes. The L or XL letters don't mean much because they vary among bikes. Assuming you're looking for a hardtail, you're probably best off looking/measuring/comparing effective top tube.
It sounds like you're squarely in the XL camp, maybe XXL if you can find one. 21" or 23" seat tube, 25+ effective top tube.