For certain functions it is. Especially when you know the function ;-)
If you mean by your question "is there an algorithm to decide automatically if an arbitrary function is idempotent or not", the answer is no, due to the theorems already mentioned in the comments. However, for specific classes of functions, one can - in theory - very easily decide if the function is idempotent or not. For example, if the function is pure (means: without any side effects), and one knows it always returns a value in a finite amount of time for any given input, then idempotency can be decided simply by trying out if f(f(x))=f(x)
for any possible input x
to the function. Not that this will be very efficient, it could run until the end of the universe.
So if that is not the answer you were looking for, write a better question, currently it is pretty unclear what exactly you are really looking for.