diff --git a/cover/private/html/html.rkt b/cover/private/html/html.rkt
index a0b4175..528c8bd 100644
--- a/cover/private/html/html.rkt
+++ b/cover/private/html/html.rkt
@@ -151,7 +151,7 @@
(meta ([charset "utf-8"]))
(link ([rel "stylesheet"] [type "text/css"] [href ,(string-append assets-path "main.css")])))
(body ()
- ,(%s->xexpr (/ covered total))
+ ,(%s->xexpr (if (= total 0) 1 (/ covered total)))
(div ([class "code"]) ,(file->html path covered?)))))
(define (%s->xexpr %)