The pilot reported that the aircraft departed with eight imperial gallons (36 litres) of fuel indicated on the fuel gauge for a one hour aerobatic training flight. The aircraft had just been refuelled, with 20 litres being added to a calculated 25 litres remaining. The flight was authorised for one hour on a planned fuel burn of 24 litres/hour and a calculated quantity of 45 litres useable. The aircraft departed the training area 55 minutes after engine start with the fuel gauge (believed to be inaccurate/completely unreliable below 5 imperial gallons) flickering around the empty position. The pilot rejoined the circuit on the upwind leg for runway 09. During the descent prior to turning crosswind, at about 1,200 ft above the ground, the engine failed. The pilot elected to land straight ahead on the runway remaining. During the descent the engine regained power momentarily which resulted in a potential overshoot of the runway. The pilot commenced a series of 'S' turns to lose height in an attempt to touch down prior to the upwind threshold. As he flared, the engine again regained power momentarily. The aircraft finally touched down in the grass overrun area where it ran through a ditch and then into a fence. When the aircraft was inspected after the accident, the fuel tank was found to be empty. There was no evidence that fuel had escaped from the tank or the fuel lines, and the carburettor had no fault that would have caused excess fuel consumption. The operator said that they were not using the fuel tank dipstick to check fuel contents because it was considered to be inaccurate. The only time they had an accurate check of fuel contents was when the tank was filled, which was not often. Fuel contents was basically being estimated on consumption rate versus time versus fuel added with the fuel gauge being used as a cross check indication but known to be inaccurate.