To impugn is to attack something as false or questionable. To impute is to attribute fault or to credit something to someone. For instance, when you blame someone for an act, you impute the act to them. Impute is not always negative, though; for example, you might impute your strong moral fiber to sensible parenting, or you might impute your last year’s income to your wife. It can be a tricky word, but it’s simple if you think of it as a synonym of ascribe or attribute.
Impugn and impute are often confused, and both are sometimes written as impune (which is not a dictionary-recognized word).
Impute‘s corresponding noun is imputation. Impugn makes impugnment.
Examples
These writers use impugn correctly:
Far be it from me to impugn Shakespeare’s verse, but I could have done with less poetry and more puppetry … [Daily Mail]
Court documents suggest the defense strategy is to impugn the credibility of the arresting officers. [Willows Journal]
They called her a drunk, a prostitute, a pornographer, a liar, mentally unstable — impugning her honor and that of her family. [CNN]
And these writers demonstrate how to use impute:
… boredom is both the presiding concern and a state of mind we might impute to the author. [Independent]
This data imputes all taxes (including corporate and excise taxes) to various income cohort … [Atlantic]
Understanding just why reactions were so divergent points to a different logic behind the address to the one imputed from outside. [Foreign Policy]

