1. The objective of this study was to investigate the efficacy of home-medicated non-steroidal anti-inflammatory (NSAID) analgesics, using an electronic patient diary. Single doses of ketoprofen 25 mg and ketoprofen 50 mg were compared with ibuprofen 200 mg and placebo in the treatment of a single occasion of episodic tension-type headache, using a double-blind, randomized, parallel group design. 2. A total of 166 patients with headache compatible with episodic tension-type headache and no refractory headaches or contraindications to NSAIDs were contacted by advertisements and selected by questionnaires. Patients performed the study at home, using an electronic diary for headache assessment, with a form to allow comments and corrections. Visual analogue scales (VAS 10 cm) of headache severity, five-item headache relief rating (HRR) scales, and time of intake of 'escape' analgesics were scored regularly, for 4 h following intake of trial medication. 3. VAS-scores (n = 1407) and HRRs (n = 452) were returned by 159 patients. Of these scores, 1.5% were inadvertently omitted from the electronic diary or modified on the comment forms. 4. Headache (VAS and HRR) improved more with all three NSAIDs than with placebo, although the effect of ibuprofen was significant for HRR only. After 2 and 4 h respectively, the reduction in VAS-ratios was 17 and 19% with placebo, 18 and 53% with ibuprofen 200 mg, 41 and 61% with ketoprofen 25 mg, and 47 and 59% with ketoprofen 50 mg. After 4 h, headache improved strongly (highest HRR) in 18% of patients on placebo, 39% on ibuprofen 200 mg, 62% on ketoprofen 25 mg, and 55% on ketoprofen 50 mg. Headache disappeared completely (VAS-score = 0) in one patient (3%) with placebo (after 180 min), 10% with ibuprofen 200 mg (average 211 min), 18% with ketoprofen 25 mg (159 min), and 28% with ketoprofen 50 mg (146 min). 5. The effects of ketoprofen 50 mg were more pronounced than those of ibuprofen 200 mg, which seemed to start later. Ketoprofen 25 mg and 50 mg were very similar, suggesting a maximal effect of the lower dose. Mild to moderate adverse events were reported by 9% of the patients, half of which occurred with ketoprofen 50 mg. Treatment of headache with ketoprofen can start with 25 mg, and possibly less. 6. Although a direct comparative study would be necessary to determine the relative benefits of the novel electronic patient diaries over traditional paper-and-pencil methods, this study has shown the usefulness of this newer technique to detect differences in efficacy between low doses of analgesics under ambulant conditions, with very limited loss of data. Electronic patient diaries appear to be an important new attribute for the efficacy assessment of self-medicated drugs.