The effects of macromolecular architecture on the osmotic pressure π and virial coefficients (B2 and B3) of star and comb polymers in good solvents are studied by dissipative particle dynamics simulations for both dilute and semiconcentrated regimes. The dependence of the osmotic pressure on polymer concentration is directly calculated by considering two reservoirs separated by a semipermeable, fictitious membrane. Our simulation results show that the ratios An+1 ≈ Bn+1 / R̂g 3n are essentially constant and A2 and A3 are arm number (f) dependent, where R̂g is zero-density radius of gyration. The value of dimensionless virial ratio g= A3 / A22 increases with arm number of stars whereas it is essentially arm number independent for comb polymers. In semiconcentrated regime the scaling relation between osmotic pressure and volume fraction, π φλ, still holds for both star and comb polymers. For comb polymers, the exponent λ is close to λ* (≈2.73 for linear chains) and is independent of the arm number. However, for star polymers, the exponent λ deviates from λ* and actually grows with increasing the arm number. This may be attributed to the significant ternary interactions near the star core in the many-arm systems.