Output impedance is the impedance ``seen'' by a load connected across the output terminals of a circuit. It's determined by Thevenin equivalent impedance found in the usual way: open circuit voltage across the terminals, divided by short circuit current. The input impedance is the impedance ``seen'' by something (nominally a supply) connected across the input terminals. It's determined operationally by the voltage across the terminals divided by the current drawn.