Compute variables in perfect competition, in monopoly and duopoly There are a given demand and MC value. How could I calculate quantity, price, and profit from these values in case of perfect competition, in monopoly and duopoly(Cournot and Stackelberg)?
Under perfect competition, $p=MC$. So you may substitute this price into the demand equation to obtain the quantity.

A monopolist chooses output in a way such that $MR=MC$. So you have $P‘(Q)*Q+P=MC(Q)$, where $P(Q)$ is the inverse demand  equation.

For Cournot, it is also simple. Note that the profit function of firm i is given by $$\pi(i)=P(q_{i}+q_{-i})*q_{i}-MC(q_{i})*q_{i}$$. You just use the first order condition to solve for the price and quantitiy respectively. $q_{-i}$ denotes the output of all players except for $i$.

Finally, for Stackelberg I would like to know how many players/firms you have. Then, I would be able to explain it to you in a suitable way. I hope this helps.