¿Is there a formula to calculate the input headroom of an amplifier?
You started with a simple question (maximum level), and made it complicated

As others have mentioned, headroom implies two values, one measurable and the other arbitrary.
A typical input stage has its max input level governed by the rail voltage and its gain. An opamp with +/-15V rails can deliver +20dBu; at unity gain, the max input level is thus +20dBu. Make it 10dB gain, and the max level drops by 10 dB, make it 6dB attenuation, max input goes to +26. That's the easy and measurable part.
Headroom involves the definition of a nominal operating level.
If the nominal is +4dBu (0VU), the headroom is 16dB for unity gain, but if the operating level is the "Tascam" level (-10dBv=>-7.8dBu), the headroom becomes 27.8dB.