Hi,
Using Brad's formula works for pure ohmic values.
But for true impedances (and this is how I understand your question) you need graphic (vector) solution.
I assume even with the value of Vout it is not possible to calculate Z as an unknown impedance.
(Combination of R L C, or R C, or R L, or L C)
Klaus
Added:
Maybe with:
* Vin, sinewave, known amplitude, known frequency
* Vout, amplitude, phase shift
* and the knwledge it is no R LC impedance
...you may be able to calculate Z