The concept of a wasted vote is related to Vote splitting and other similar phenomina. A wasted vote is a vote which does not have the intended effect of voter because its power in tabulation is lost. The definition is not universally agreed upon and is somewhat system dependant. Most commonly the term is used colloquially without intention to imply that there is a strict definition.
Calculating the number of wasted votes in a FPTP electionEdit
The number of wasted votes in a FPTP election are the number of votes that didn't count towards or against electing the winning candidate.
The tally of wasted votes includes all votes towards any candidate whom does not finish either 1st or 2nd in the election. This is because FPTP elections are ultimately decided by which of the two front runners has more votes and any votes for third parties effectively don't matter (they only matter when the third party actually ends up being one of the front runners in which case they are no longer all wasted votes).
Additionally, since in order to win an election the winner need only have more votes then their opponent (and as FPTP elections are winner take all, they cannot win extra seats for beating their opponent by a large margin) the number of votes cast for the winning candidate above the threshold of votes needed to surpass the candidate with the 2nd most votes are also considered wasted.
Finally, in an uncontested election where there is only one candidate, that threshold becomes 1 (thus all but a single vote are wasted) since as long as at-least one person votes for the single candidate, it does not matter how many additional votes they receive in order to win the election.
1st generalization: Calculating the number of wasted votes under deterministic non-delegated voting methods that pass the participation criterionEdit
For voting methods that pass the participation criterion, one possible way to define the number of wasted votes in an election under that voting method is as follows:
The number of wasted votes is equal to number of votes in the largest possible set of votes such that for any possible subset of votes in this set, removing those votes cannot change the election result. (footnote 1)
When this mathematical definition of the number of wasted votes in an election is applied to FPTP, it produces the same count for the number of wasted votes the procedure above produces.
However this definition does have it's limitations: in voting methods that do not pass the participation criterion, such participation failures can drastically deflate the tally of the number of wasted votes. Example: consider the fallowing voting method: voters cast single preference votes and if there are an odd number of votes cast, the candidate with the most votes wins, otherwise the candidate with the 2nd most votes wins. Under this definition of wasted votes, there are no wasted votes under this method because every vote changes the winner. However not every vote changes the winner in a way that benefits the voter who cast it, and if a voter casts a vote that worsens the election result from their perspective, then they might as well not even cast that vote to begin with.
2nd generalization: Calculating the number of wasted votes under all deterministic non-delegated voting methodsEdit
A 2nd possible generalization of the previous generalized definition of wasted votes to methods that do not pass the participation criterion is as fallows:
The number of wasted votes is equal to number of votes in the largest possible set of votes such that for any possible subset of votes in this set, removing those votes cannot change the election result if none of the voters who's votes are in that subset prefer the new election result to the old one.
Note that for methods that allow voters to omit preferences between candidates, calculating this metric exactly (footnote 2) requires knowing not just all of the votes used in the election to calculate, but also the preferences of all of the voters casting those votes. This means that this metric is no-longer defined by just the raw votes, as under such methods, multiple elections in which the exact same votes are cast can have different numbers of wasted votes depending on the voters casting those votes.
Footnote 1: An election result in which 2 possible election outcomes are tied is a different election result then one in which there is only one winning election outcome (one winning candidate in a single winner election).
Footnote 2: It can still be approximated by making assumptions about for any two candidates A and B, the probability that a voter that rates/ranks them equally prefers A over B vs. B over A (vs. actually liking A and B exactly the same if it's assumed that some voters like some candidates exactly the same).