diff --git a/res/values/strings.xml b/res/values/strings.xml
index f950ad2..9f1dd90 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1793,4 +1793,13 @@
 
     <!-- Content description for (...) in no name header [CHAR LIMIT=30]-->
     <string name="description_no_name_header">Ellipsis</string>
+
+    <!-- Formatted call duration displayed in recent card in QuickContact, for duration less than 1 minute -->
+    <string name="callDurationSecondFormat"><xliff:g id="seconds">%s</xliff:g> sec</string>
+
+    <!-- Formatted call duration displayed in recent card in QuickContact, for duration less than 1 hour -->
+    <string name="callDurationMinuteFormat"><xliff:g id="minutes">%s</xliff:g> min <xliff:g id="seconds">%s</xliff:g> sec</string>
+
+    <!-- Formatted call duration displayed in recent card in QuickContact, for duration more than 1 hour -->
+    <string name="callDurationHourFormat"><xliff:g id="minutes">%s</xliff:g> hr <xliff:g id="minutes">%s</xliff:g> min <xliff:g id="seconds">%s</xliff:g> sec</string>
 </resources>
diff --git a/src/com/android/contacts/interactions/CallLogInteraction.java b/src/com/android/contacts/interactions/CallLogInteraction.java
index 3464c0f..06fd273 100644
--- a/src/com/android/contacts/interactions/CallLogInteraction.java
+++ b/src/com/android/contacts/interactions/CallLogInteraction.java
@@ -87,9 +87,18 @@
 
     @Override
     public String getViewFooter(Context context) {
-        Long date = getDate();
-        return date == null ? null : ContactInteractionUtil.formatDateStringFromTimestamp(
-                date, context);
+        final Long date = getDate();
+        if (date != null) {
+            final StringBuilder callDetail = new StringBuilder();
+            callDetail.append(ContactInteractionUtil.formatDateStringFromTimestamp(date, context));
+            final Long duration = getDuration();
+            if (duration != null) {
+                callDetail.append("\n");
+                callDetail.append(ContactInteractionUtil.formatDuration(duration, context));
+            }
+            return callDetail.toString();
+        }
+        return null;
     }
 
     @Override
diff --git a/src/com/android/contacts/interactions/ContactInteractionUtil.java b/src/com/android/contacts/interactions/ContactInteractionUtil.java
index 8ec0547..b2bda5d 100644
--- a/src/com/android/contacts/interactions/ContactInteractionUtil.java
+++ b/src/com/android/contacts/interactions/ContactInteractionUtil.java
@@ -26,6 +26,8 @@
 
 import java.util.Calendar;
 
+import com.android.contacts.R;
+
 /**
  * Utility methods for interactions and their loaders
  */
@@ -84,4 +86,23 @@
         return c1.get(Calendar.YEAR) == c2.get(Calendar.YEAR) &&
                 c1.get(Calendar.DAY_OF_YEAR) == c2.get(Calendar.DAY_OF_YEAR);
     }
+
+    /**
+     * Takes duration of the call in seconds.
+     * Return the formatted duration in hr, min, sec order if they exist.
+     */
+    @NeededForTesting
+    public static String formatDuration(long callDuration, Context context) {
+        final int hours = (int) callDuration / 3600;
+        final int minutes = (int) (callDuration % 3600) / 60;
+        final int seconds = (int) (callDuration % 60);
+
+        if (hours > 0) {
+            return context.getString(R.string.callDurationHourFormat, hours, minutes, seconds);
+        } else if (minutes > 0) {
+            return context.getString(R.string.callDurationMinuteFormat, minutes, seconds);
+        } else {
+            return context.getString(R.string.callDurationSecondFormat, seconds);
+        }
+    }
 }
diff --git a/tests/src/com/android/contacts/interactions/ContactInteractionUtilTest.java b/tests/src/com/android/contacts/interactions/ContactInteractionUtilTest.java
index 86167c1..07ad722 100644
--- a/tests/src/com/android/contacts/interactions/ContactInteractionUtilTest.java
+++ b/tests/src/com/android/contacts/interactions/ContactInteractionUtilTest.java
@@ -90,6 +90,31 @@
                         getContext()));
     }
 
+    public void testFormatDuration_zero() {
+        assertEquals("0 sec",
+                ContactInteractionUtil.formatDuration(0, getContext()));
+    }
+
+    public void testFormatDuration_minZeroSec() {
+        assertEquals("1 min 0 sec",
+                ContactInteractionUtil.formatDuration(60, getContext()));
+    }
+
+    public void testFormatDuration_minSec() {
+        assertEquals("30 min 9 sec",
+                ContactInteractionUtil.formatDuration(1809, getContext()));
+    }
+
+    public void testFormatDuration_hrZeroMinZeroSec() {
+        assertEquals("1 hr 0 min 0 sec",
+                ContactInteractionUtil.formatDuration(3600, getContext()));
+    }
+
+    public void testFormatDuration_hrMinSec() {
+        assertEquals("2 hr 44 min 36 sec",
+                ContactInteractionUtil.formatDuration(9876, getContext()));
+    }
+
     private void setLocale(Locale locale) {
         Locale.setDefault(locale);
         Resources res = getContext().getResources();
