diff --git a/gr-checks/gr-checks-item.js b/gr-checks/gr-checks-item.js
index 494a330..40c4d77 100644
--- a/gr-checks/gr-checks-item.js
+++ b/gr-checks/gr-checks-item.js
@@ -225,21 +225,21 @@
   if (secondsAgo % 60 !== 0) {
     durationSegments.push(`${secondsAgo % 60} sec`);
   }
-  const minutesAgo = Math.round(secondsAgo / 60);
+  const minutesAgo = Math.floor(secondsAgo / 60);
   if (minutesAgo % 60 !== 0) {
     durationSegments.push(`${minutesAgo % 60} min`);
   }
-  const hoursAgo = Math.round(minutesAgo / 60);
+  const hoursAgo = Math.floor(minutesAgo / 60);
   if (hoursAgo % 24 !== 0) {
     const hours = pluralize(hoursAgo % 24, 'hour', 'hours');
     durationSegments.push(`${hoursAgo % 24} ${hours}`);
   }
-  const daysAgo = Math.round(hoursAgo / 24);
+  const daysAgo = Math.floor(hoursAgo / 24);
   if (daysAgo % 30 !== 0) {
     const days = pluralize(daysAgo % 30, 'day', 'days');
     durationSegments.push(`${daysAgo % 30} ${days}`);
   }
-  const monthsAgo = Math.round(daysAgo / 30);
+  const monthsAgo = Math.floor(daysAgo / 30);
   if (monthsAgo > 0) {
     const months = pluralize(monthsAgo, 'month', 'months');
     durationSegments.push(`${monthsAgo} ${months}`);
@@ -255,4 +255,4 @@
  */
 function pluralize(unit, singular, plural) {
   return unit === 1 ? singular : plural;
-}
\ No newline at end of file
+}
diff --git a/gr-checks/gr-checks-item_test.html b/gr-checks/gr-checks-item_test.html
index e9ce401..305d965 100644
--- a/gr-checks/gr-checks-item_test.html
+++ b/gr-checks/gr-checks-item_test.html
@@ -79,6 +79,42 @@
             .querySelector(`td:nth-of-type(${idx})`);
         assert.equal(name.textContent.trim(), '0 sec');
       });
+
+      test('renders > 1m correctly', () => {
+        element.check = {
+          checkId: 'test-check-id',
+           started: '2019-02-06T22:25:19.269Z',
+          finished: '2019-02-06T22:45:29.269Z',
+        };
+        const idx = CHECKS_ITEM.DURATION;
+        const name = element.shadowRoot
+            .querySelector(`td:nth-of-type(${idx})`);
+        assert.equal(name.textContent.trim(), '20 min 10 sec');
+      });
+
+      test('renders > 1h correctly', () => {
+        element.check = {
+          checkId: 'test-check-id',
+           started: '2019-02-06T22:25:19.269Z',
+          finished: '2019-02-06T23:45:29.269Z',
+        };
+        const idx = CHECKS_ITEM.DURATION;
+        const name = element.shadowRoot
+            .querySelector(`td:nth-of-type(${idx})`);
+        assert.equal(name.textContent.trim(), '1 hour 20 min');
+      });
+
+      test('renders > 1d correctly', () => {
+        element.check = {
+          checkId: 'test-check-id',
+           started: '2019-02-06T22:25:19.269Z',
+          finished: '2019-02-07T23:45:29.269Z',
+        };
+        const idx = CHECKS_ITEM.DURATION;
+        const name = element.shadowRoot
+            .querySelector(`td:nth-of-type(${idx})`);
+        assert.equal(name.textContent.trim(), '1 day 1 hour');
+      });
     });
 
     test('renders a link to the log', () => {
