Yes and no. Part of the issue is the pharma companies are only interested in testing new drugs that are under patent. Whereas these are by far the riskiest drugs to develop since much less is known about them. In contrast there are hundreds of other chemicals that have the potential to cure everything from cancer to PTSD, and they would cost only a few million dollars to turn into commercial drugs, but it's never done because there would be no profit in it. So yes failed drugs make sense to count from the viewpoint of the balance sheet of a pharma company, but it's not a very good answer to the question about how much it actually costs to develop an individual drug.
That's inherently wrong, if only because there's no one who knows the actual statistics. We know that it's possible to develop a drug for less than $20 million, how much pharma actually spends is indeterminate.
Yes and no. Part of the issue is the pharma companies are only interested in testing new drugs that are under patent. Whereas these are by far the riskiest drugs to develop since much less is known about them. In contrast there are hundreds of other chemicals that have the potential to cure everything from cancer to PTSD, and they would cost only a few million dollars to turn into commercial drugs, but it's never done because there would be no profit in it. So yes failed drugs make sense to count from the viewpoint of the balance sheet of a pharma company, but it's not a very good answer to the question about how much it actually costs to develop an individual drug.