An intermittent rotary machine for filling capsules with pharmaceutical or nutraceutical products is provided with a dosing disc, which delimits a hopper at the bottom for containing a pharmaceutical or nutraceutical powder product and has at least a group of dosing chambers, which are fed first of all through at least one compacting station, in the area of which the product contained in each dosing chamber is compacted by a respective compacting piston, and then through an expulsion station, in the area of which only part of the product contained in each dosing chamber is discharged into a respective capsule by a respective expelling piston.