Argumentation-based debates are mechanisms that a group can use to resolve conflicting opinions and hence reach agreement. They have many potential applications in on-line communities and other open environments. In this paper, we provide computational infrastructure to support argumentation-based debates, in particular focusing on the problem of how participants in a debate can reach agreement about the outcome of the debate, given all the statements that have been made. Our approach makes it possible to represent arguments that are put forward by the participants in a debate, allows both positive and negative relationships between the arguments to be represented, and makes it possible for participants to express opinions about both the arguments and the outcome of the debate. Our main contribution is to provide a novel method-indeed the first method-for computing the collective decision that emerges from the combination of a set of arguments and a set of opinions about whether the arguments hold or not. To do this, we carry out a formal investigation of a family of aggregation functions. This family starts with a function that is firmly rooted in the social choice literature, and is extended with functions that are more oriented towards the use of argumentation. We prove that to ensure that the collective decision is coherent, a property that we think is essential, an aggregation function needs to take into account the dependencies between arguments. We also provide an empirical analysis of the performance of our approach to reaching a collective decision, showing that a collective decision can be reached for debates, of the size that one currently finds online, in reasonable time.