There is no definitive method of telling whether a compound is an oxidant or a reductant by looking at its molecular formula.
The earlier definition for oxidation involved the gain of oxygen and/or the removal of hydrogen. You might, therefore, expect compounds that contain oxygen to be good oxidising agents.
This is true for say,
The general definition for oxidation is the loss of electrons so you might expect species with a positive centre to be good oxidisers.
This is true for species such as
This can be accounted for by the strong attraction their nuclei have for incoming electrons and the benefit of exchange energy stability acquired by achieving a full
You could apply the same reasoning when looking at reducing agents. Reduction is gain of electrons so you might expect electropositive metals such as sodium and magnesium to be good reducing agents - and you would be correct.
However, you can't tell that
The ability to oxidise or reduce, like many properties in chemistry, lies on a continuum and is relative.
The best way to assess whether a species will be a good oxidiser or reducer is to consult a table of Standard Electrode Potentials (
I won't go into how they are measured here but when they are listed negative to positive you find the most powerful oxidising agents to be at the bottom left of the table and the most powerful reducing agents to at the top right.
These values can be used to predict whether a redox reaction is feasible.
I won't go into that here as this answer is getting a bit long. If you want more on how you would do this I am happy to answer if you post a separate question.