How it is worked out
Take the number of the tithi, from Shukla Pratipada as 1 to Amavasya as 30, double it, add five and divide by seven. The remainder gives the residence: 1, Kailasa, bringing happiness; 2, with Gauri, bringing wealth and family happiness; 3, on Vrishabha, Nandi, bringing success; 4, in the Sabha, the assembly, bringing worry; 5, at Bhojana, the meal, bringing pain; 6, at Krida, play, bringing trouble; and 0, in the Shmashana, the cremation ground, said to bring death or great loss.
For example, on Shukla Dwitiya (2): 2 × 2 + 5 = 9, which divided by 7 leaves 2, so Shiva is with Gauri, a good day. The residence changes when the tithi changes.
When it matters
The idea is that one should not disturb Shiva for a special request while he is busy in his court, eating, playing or in the cremation ground. Shivavasa is therefore checked for a Rudrabhishek, Laghurudra or Maharudra, or a Shiva homa performed with a particular wish (kamya).
It is not checked for daily worship of the Shivalinga, for worship on Mondays, Pradosha, Shivaratri, in the month of Shravana or at the Jyotirlingas, or for worship done without any desire for a result: Shiva can be worshipped at any time with devotion.