mental health calculators

Sleep Quality Index Calculator

Score your sleep quality across five clinically recognized dimensions — duration, latency, efficiency, disturbances, and daytime function. Ideal for anyone investigating whether poor sleep is affecting their health or productivity.

About this calculator

This calculator is modeled on the Pittsburgh Sleep Quality Index (PSQI), a validated clinical tool that scores sleep across multiple components on a 0–3 scale each, then sums them. A total score above 5 is the clinical threshold for poor sleep quality. The five components here are: (1) Duration score — 0 if 7–9 hours, scaled up to 3 for greater deviation; (2) Latency score — sleep_latency divided by 15, capped at 3; (3) Efficiency score — derived from (1 − sleep_efficiency) × 3, capped at 3; (4) Disturbance score — disturbances divided by 2, capped at 3; (5) Daytime dysfunction score — taken directly from a 0–3 rating. Total = sum of all five component scores (max 15). Lower is better; scores of 0–5 indicate good sleep, 6–10 moderate impairment, and 11–15 severe impairment.

How to use

Example: sleep_duration = 6 hrs, sleep_latency = 35 min, sleep_efficiency = 0.80, disturbances = 3 per week, daytime_dysfunction = 2. Duration: 7 − 6 = 1 × 1.5 = 1.5 → ceil = 2. Latency: 35 ÷ 15 = 2.33 → ceil = 3. Efficiency: (1 − 0.80) × 3 = 0.6 → ceil = 1. Disturbances: 3 ÷ 2 = 1.5 → ceil = 2. Daytime dysfunction: 2. Total = 2 + 3 + 1 + 2 + 2 = 10. A score of 10 falls in the moderate impairment range, suggesting both sleep duration and latency need attention.

Frequently asked questions

What is a good sleep quality index score and what score indicates a problem?

Scores of 0–5 indicate good overall sleep quality, consistent with the PSQI's validated cutoff. Scores from 6–10 suggest moderate sleep impairment that may be affecting cognitive performance and mood. Scores of 11 or above reflect severe disruption and are associated with clinical sleep disorders, depression, and chronic fatigue. If you consistently score above 5, a sleep specialist or physician can perform more comprehensive testing such as polysomnography.

How does sleep efficiency affect the sleep quality score?

Sleep efficiency is the ratio of time actually asleep to total time spent in bed. A value of 0.85 (85%) or above is considered normal; values below this inflate the efficiency component score. Even if you spend 8 hours in bed, low efficiency — caused by waking frequently or lying awake — can push your total score into the poor range. Improving sleep hygiene, such as avoiding screens before bed and maintaining a consistent schedule, typically raises efficiency within weeks.

Why does daytime dysfunction matter in calculating sleep quality?

Daytime dysfunction captures the real-world consequence of poor sleep — difficulty staying awake, reduced concentration, or impaired motivation during waking hours. It is the component most directly linked to productivity loss, driving safety, and mental health outcomes. Including it ensures the calculator reflects functional impact, not just overnight metrics. If your daytime dysfunction score is 2 or 3, that alone warrants investigation even if your overnight scores appear acceptable.