Speaking as someone who has only played cricket at levels as high as churches A-grade and Saturday league cricket, I am obviously imminently qualified to write about cricket at Test level. Also, having never been a captain of a side and never having to have had to make decisions which affect the outcome of a match, I'm also overqualified to write about tactics and strategy. It is in that vein, as an armchair expert that I write about that most chimeral of things - the declaration.
I have seen declarations in the past where both captains have come to a mutual agreement to declare both innings without score. This usually happens in the event of rain and there's still some reason, like points on a ladder, where making a declaration of that type makes some sort of sense. Those declarations are sensible. However they're not really of the sort that you'd find in a regular, normal, unaffected match. Those declarations require, in my irrationally exuberant opinion, mathematics.
Even before a ball has been sent down 22 yards in anger, the captains will be aware of one guaranteed aspect of a test match: it lasts five days. Even before you start to work out things like par scores for the ground, this is an immutable fact.
There is also one other guaranteed aspect of a match; that is that in order to win, you must have the other side conclude their innings twice. Under normal circumstances, this means taking twenty wickets and so the biggest single determinant should be the amount of time required to take those twenty wickets.
This means an insanely simple calculation. Ideally, every declaration should be as close as possible to the ideal time required to take those twenty wickets and so dividing the match into four quarters should give you an excellent guide as to when to conclude an innings:
1st Innings: Day 2, the 22nd over (which will occur before lunch)
2nd Innings: Day 3, the 45th over (which happens half way through the middle session)
3rd Innings: Day 4, the 67th over (which is just after the tea break)
4th Innings: A fourth innings is always chasing a result. Either it succeeds or fails. To declare in the fourth innings of a match is to instantly lose. It would be the sign of an eejit.
Under normal circumstances, declaring earlier than this not only short changes your own batsmen, it gifts the opposition more time to accumulate the runs that you've set for them. Declaring later than this, steals time away from your own bowlers and they'll need that time to take the wickets for you.
In this respect, cricket is similar to Formula One motor racing. If your car lasts for more than a hundred yards beyond the end of the motor race, then the car has been built too strongly and is inefficient. If your car fails before the end of the motor race, then the car has not been built strong enough and this is inadequate.
There are of course exceptions to the above guidelines to making a declaration. If you are batting first and you can keep on batting, then ideally you should treat your first innings as a double innings and declare half way through the middle session on Day 3 as though it were a second innings.
If you are batting second and you can keep on batting, then ideally you should treat your innings as a double innings and declare just after the tea break on Day 4 as though it was the third innings of a match.
This is going to sound almost bizarre but every form of cricket is essentially a limited overs match. In Twenty 20 matches and One Day Internationals, this is explicit but unless for some completely bizarre and unknown reason yet devised and the side bowling wants to bowl more than 90 overs in a day, a Test Match will have 450 overs as a maximum.
Yes I am aware that cricket is a game replete with tradition, pomp and circumstance, and the story of a cricket match ebbs and flows as though it were a living, breathing beast but it is after all a game and the purpose of a game is to win. The declaration is an instrument used in the purpose of winning and say what you like about the psychological advantage it might confer, a game with defined conditions for wining means that this instrument has an ideal set of points as to when it it best deployed.
Aside (and this is a massive aside):
There is an exception to the guidelines above and I think that it would be so dastardly as to have nuclear bomb type implications. Both of which involve either declaring way too late or not at all.
Test Matches are usually played in a series and so winning the series is often more important than any given match within it. If you are in the delightful position of having won previous matches and the current one might allow the opposition to draw, then declaring as late as possible so that the match dribbles out to a draw is acceptable. It might not be exciting and it might not be sporting but if you can steal away the possibility of a win from the opposition then the ends justify the means.
The other exception is when you intend to bat for so long that the opposition spends several days out in the field. If you are batting first and you have the capability of surviving for all five days, you should absolutely and resolutely do it. The glittering prize of an innings of four digits awaits you and the first class record of 1107 runs which was scored by Victoria has been taunting batting teams for almost ninety years. In that case, winning an individual match or even a series is not the objective but winning immortality.
At 566-8 and only on Day 2, Australia's declaration was dumb - see above.