From Delhi, you need minimum 12 days, where day 1 & 12 is for Delhi to Haridwar up down. From day 2 to day 11, you will properly explore all char dham yatra, where from day 2 to day 5, you will visit Yamunotri and Gangotri temples.
From day 6 to day 11, you will visit Badrinath & Kedarnath temple. By day 11 night, you will come back to Haridwar from Joshimath or Pipalkoti. And on day 12, after exploring Haridwar, you will be back in Delhi.