A caliper &/or a tape measure in the areas of the bike that the tire passes closest. Then subtract out 4-5mm on all sides and that is the theoretical "maximum." You want to have clearance for mud, rocks, dirt, etc...to clear. You also want room for tire casing stretch/relaxation and to allow for any frame flex that occured while riding.
Some people push "maximum" more than others and do just fine, others don't. A rubber tire can and will cut through a bicycle tube be it carbon, aluminium, or steel.
You also have the maximum amount your brake calipers can open to consider as well. Deflating a tire to get past the brake pads can be a PIA.