{"id":1541,"date":"2026-08-29T16:24:37","date_gmt":"2026-08-29T16:24:37","guid":{"rendered":"https:\/\/runnersascend.co.uk\/?page_id=1541"},"modified":"2026-08-29T17:20:30","modified_gmt":"2026-08-29T17:20:30","slug":"pace-calculator","status":"publish","type":"page","link":"https:\/\/runnersascend.co.uk\/sw\/pace-calculator\/","title":{"rendered":"Kikokotoo cha Pace"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1541\" class=\"elementor elementor-1541\">\n\t\t\t\t<div class=\"elementor-element elementor-element-1274c84 e-flex e-con-boxed e-con e-parent\" data-id=\"1274c84\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-9cdf4a7 elementor-widget elementor-widget-html\" data-id=\"9cdf4a7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<div id=\"ra-pace-calculator\">\r\n\r\n  <div class=\"ra-calculator-card\">\r\n\r\n    <h2>Pace Calculator<\/h2>\r\n\r\n    <p class=\"ra-intro\">\r\n      Enter your race distance and target time to calculate the pace you need.\r\n    <\/p>\r\n\r\n    <div class=\"ra-unit-toggle\">\r\n      <button type=\"button\" class=\"ra-unit active\" data-unit=\"km\">\r\n        Kilometres\r\n      <\/button>\r\n\r\n      <button type=\"button\" class=\"ra-unit\" data-unit=\"mi\">\r\n        Miles\r\n      <\/button>\r\n    <\/div>\r\n\r\n    <label for=\"ra-distance\">Race Distance<\/label>\r\n\r\n    <select id=\"ra-distance\">\r\n\r\n      <option value=\"5\">5K<\/option>\r\n      <option value=\"10\">10K<\/option>\r\n      <option value=\"21.0975\">Half Marathon<\/option>\r\n      <option value=\"42.195\">Marathon<\/option>\r\n      <option value=\"custom\">Custom Distance<\/option>\r\n\r\n    <\/select>\r\n\r\n    <div id=\"ra-custom-distance\" style=\"display:none;\">\r\n\r\n      <label for=\"ra-custom-value\">Distance<\/label>\r\n\r\n      <input\r\n        type=\"number\"\r\n        id=\"ra-custom-value\"\r\n        min=\"0.1\"\r\n        step=\"0.01\"\r\n        placeholder=\"Enter distance\"\r\n      >\r\n\r\n    <\/div>\r\n\r\n    <label>Target Time<\/label>\r\n\r\n    <div class=\"ra-time-inputs\">\r\n\r\n      <div>\r\n        <input type=\"number\" id=\"ra-hours\" min=\"0\" value=\"0\">\r\n        <span>Hours<\/span>\r\n      <\/div>\r\n\r\n      <div>\r\n        <input type=\"number\" id=\"ra-minutes\" min=\"0\" max=\"59\" value=\"45\">\r\n        <span>Minutes<\/span>\r\n      <\/div>\r\n\r\n      <div>\r\n        <input type=\"number\" id=\"ra-seconds\" min=\"0\" max=\"59\" value=\"0\">\r\n        <span>Seconds<\/span>\r\n      <\/div>\r\n\r\n    <\/div>\r\n\r\n    <button type=\"button\" id=\"ra-calculate\">\r\n      Calculate Pace\r\n    <\/button>\r\n\r\n    <div id=\"ra-results\" class=\"ra-results\">\r\n\r\n      <div class=\"ra-result-main\">\r\n\r\n        <span>Your Target Pace<\/span>\r\n\r\n        <strong id=\"ra-pace\">9:00<\/strong>\r\n\r\n        <small id=\"ra-pace-unit\">min\/km<\/small>\r\n\r\n      <\/div>\r\n\r\n      <div class=\"ra-result-grid\">\r\n\r\n        <div>\r\n          <span>Speed<\/span>\r\n          <strong id=\"ra-speed\">6.67<\/strong>\r\n          <small id=\"ra-speed-unit\">km\/h<\/small>\r\n        <\/div>\r\n\r\n        <div>\r\n          <span>Distance<\/span>\r\n          <strong id=\"ra-result-distance\">5.00<\/strong>\r\n          <small id=\"ra-distance-unit\">km<\/small>\r\n        <\/div>\r\n\r\n      <\/div>\r\n\r\n      <div class=\"ra-splits\">\r\n\r\n        <h3>Race Splits<\/h3>\r\n\r\n        <div id=\"ra-split-list\"><\/div>\r\n\r\n      <\/div>\r\n\r\n    <\/div>\r\n\r\n  <\/div>\r\n\r\n\r\n  <div id=\"ra-training-insight\" class=\"ra-training-insight\">\r\n\r\n    <h2>What Does Your Target Require?<\/h2>\r\n\r\n    <p class=\"ra-insight-intro\">\r\n      Your target pace is more than just a number. It represents the level of fitness required to sustain that pace over your chosen distance.\r\n    <\/p>\r\n\r\n    <div class=\"ra-target-summary\">\r\n\r\n      <span>Your Target<\/span>\r\n\r\n      <strong id=\"ra-insight-target\">5K \u2014 45:00<\/strong>\r\n\r\n      <small id=\"ra-insight-pace\">9:00 min\/km<\/small>\r\n\r\n    <\/div>\r\n\r\n    <div class=\"ra-insight-content\">\r\n\r\n      <h3 id=\"ra-insight-title\">\r\n        Understanding Your Target\r\n      <\/h3>\r\n\r\n      <p id=\"ra-insight-text\">\r\n        Select a race distance and target time to see what your target may require from your training.\r\n      <\/p>\r\n\r\n      <div class=\"ra-training-focus\">\r\n\r\n        <h3>Training Focus<\/h3>\r\n\r\n        <ul id=\"ra-focus-list\"><\/ul>\r\n\r\n      <\/div>\r\n\r\n    <\/div>\r\n\r\n    <div class=\"ra-insight-note\">\r\n\r\n      <strong>Remember:<\/strong>\r\n      Your target race pace is the outcome of your training.\r\n      It doesn't mean every training session should be run at that pace.\r\n\r\n    <\/div>\r\n\r\n  <\/div>\r\n\r\n<\/div>\r\n\r\n\r\n<style>\r\n\r\n\/* =========================================\r\n   MAIN\r\n   ========================================= *\/\r\n\r\n#ra-pace-calculator {\r\n\r\n  width: 100%;\r\n  max-width: 680px;\r\n  margin: 0 auto;\r\n  font-family: inherit;\r\n\r\n}\r\n\r\n#ra-pace-calculator * {\r\n  box-sizing: border-box;\r\n}\r\n\r\n\r\n\/* =========================================\r\n   CALCULATOR CARD\r\n   ========================================= *\/\r\n\r\n.ra-calculator-card {\r\n\r\n  background: #ffffff;\r\n  padding: 35px;\r\n  border-radius: 18px;\r\n  box-shadow: 0 8px 30px rgba(0,0,0,0.08);\r\n\r\n}\r\n\r\n.ra-calculator-card h2 {\r\n\r\n  margin: 0 0 10px;\r\n  font-size: 32px;\r\n  font-weight: 700;\r\n\r\n}\r\n\r\n.ra-intro {\r\n\r\n  margin: 0 0 25px;\r\n  font-size: 16px;\r\n  line-height: 1.6;\r\n\r\n}\r\n\r\n\r\n\/* =========================================\r\n   UNIT TOGGLE\r\n   ========================================= *\/\r\n\r\n.ra-unit-toggle {\r\n\r\n  display: flex;\r\n  gap: 10px;\r\n  margin-bottom: 25px;\r\n\r\n}\r\n\r\n.ra-unit {\r\n\r\n  flex: 1;\r\n  padding: 13px;\r\n  border: 1px solid #ddd;\r\n  background: #f7f7f7;\r\n  color: #333333;\r\n  border-radius: 8px;\r\n  cursor: pointer;\r\n  font-weight: 600;\r\n  font-size: 15px;\r\n\r\n}\r\n\r\n.ra-unit.active {\r\n\r\n  background: #f05a28;\r\n  color: #ffffff;\r\n  border-color: #f05a28;\r\n\r\n}\r\n\r\n\r\n\/* =========================================\r\n   LABELS\r\n   ========================================= *\/\r\n\r\n.ra-calculator-card label {\r\n\r\n  display: block;\r\n  margin: 18px 0 8px;\r\n  font-weight: 600;\r\n\r\n}\r\n\r\n\r\n\/* =========================================\r\n   DROPDOWN\r\n   ========================================= *\/\r\n\r\n#ra-distance {\r\n\r\n  width: 100%;\r\n  height: 50px;\r\n  padding: 0 14px;\r\n  border: 1px solid #d8d8d8;\r\n  border-radius: 8px;\r\n  background-color: #ffffff;\r\n  color: #1e2b3c;\r\n  font-family: inherit;\r\n  font-size: 16px;\r\n  font-weight: 500;\r\n  line-height: 50px;\r\n  cursor: pointer;\r\n\r\n}\r\n\r\n#ra-distance option {\r\n\r\n  color: #1e2b3c;\r\n  background: #ffffff;\r\n  font-size: 16px;\r\n\r\n}\r\n\r\n\r\n\/* =========================================\r\n   INPUTS\r\n   ========================================= *\/\r\n\r\n.ra-calculator-card input {\r\n\r\n  width: 100%;\r\n  height: 50px;\r\n  padding: 0 14px;\r\n  border: 1px solid #d8d8d8;\r\n  border-radius: 8px;\r\n  font-size: 16px;\r\n  background: #ffffff;\r\n  color: #1e2b3c;\r\n\r\n}\r\n\r\n\r\n\/* =========================================\r\n   TARGET TIME\r\n   ========================================= *\/\r\n\r\n.ra-time-inputs {\r\n\r\n  display: grid;\r\n  grid-template-columns: repeat(3, 1fr);\r\n  gap: 12px;\r\n\r\n}\r\n\r\n.ra-time-inputs div {\r\n\r\n  text-align: center;\r\n\r\n}\r\n\r\n.ra-time-inputs span {\r\n\r\n  display: block;\r\n  margin-top: 5px;\r\n  font-size: 12px;\r\n  color: #777777;\r\n\r\n}\r\n\r\n\r\n\/* =========================================\r\n   BUTTON\r\n   ========================================= *\/\r\n\r\n#ra-calculate {\r\n\r\n  width: 100%;\r\n  margin-top: 28px;\r\n  padding: 15px 20px;\r\n  border: none;\r\n  border-radius: 8px;\r\n  background: #f05a28;\r\n  color: #ffffff;\r\n  font-size: 16px;\r\n  font-weight: 700;\r\n  cursor: pointer;\r\n\r\n}\r\n\r\n#ra-calculate:hover {\r\n  opacity: 0.9;\r\n}\r\n\r\n\r\n\/* =========================================\r\n   RESULTS\r\n   ========================================= *\/\r\n\r\n.ra-results {\r\n\r\n  margin-top: 30px;\r\n\r\n}\r\n\r\n.ra-result-main {\r\n\r\n  text-align: center;\r\n  padding: 25px;\r\n  border-radius: 14px;\r\n  background: #f7f7f7;\r\n\r\n}\r\n\r\n.ra-result-main span,\r\n.ra-result-grid span {\r\n\r\n  display: block;\r\n  font-size: 14px;\r\n  color: #666666;\r\n\r\n}\r\n\r\n.ra-result-main strong {\r\n\r\n  display: block;\r\n  margin-top: 6px;\r\n  font-size: 44px;\r\n  line-height: 1.1;\r\n\r\n}\r\n\r\n.ra-result-main small {\r\n\r\n  font-size: 15px;\r\n  color: #666666;\r\n\r\n}\r\n\r\n\r\n\/* =========================================\r\n   RESULT GRID\r\n   ========================================= *\/\r\n\r\n.ra-result-grid {\r\n\r\n  display: grid;\r\n  grid-template-columns: 1fr 1fr;\r\n  gap: 15px;\r\n  margin-top: 15px;\r\n\r\n}\r\n\r\n.ra-result-grid > div {\r\n\r\n  padding: 20px;\r\n  background: #f7f7f7;\r\n  border-radius: 12px;\r\n  text-align: center;\r\n\r\n}\r\n\r\n.ra-result-grid strong {\r\n\r\n  display: inline-block;\r\n  margin-top: 6px;\r\n  font-size: 24px;\r\n\r\n}\r\n\r\n.ra-result-grid small {\r\n\r\n  color: #666666;\r\n\r\n}\r\n\r\n\r\n\/* =========================================\r\n   SPLITS\r\n   ========================================= *\/\r\n\r\n.ra-splits {\r\n\r\n  margin-top: 25px;\r\n\r\n}\r\n\r\n.ra-splits h3 {\r\n\r\n  margin-bottom: 15px;\r\n\r\n}\r\n\r\n.ra-split-row {\r\n\r\n  display: flex;\r\n  justify-content: space-between;\r\n  align-items: center;\r\n  padding: 11px 0;\r\n  border-bottom: 1px solid #eeeeee;\r\n\r\n}\r\n\r\n\r\n\/* =========================================\r\n   TRAINING INSIGHT\r\n   ========================================= *\/\r\n\r\n.ra-training-insight {\r\n\r\n  margin-top: 30px;\r\n  padding: 30px;\r\n  background: #ffffff;\r\n  border-radius: 18px;\r\n  box-shadow: 0 8px 30px rgba(0,0,0,0.08);\r\n\r\n}\r\n\r\n.ra-training-insight h2 {\r\n\r\n  margin: 0 0 12px;\r\n  font-size: 28px;\r\n  font-weight: 700;\r\n\r\n}\r\n\r\n.ra-insight-intro {\r\n\r\n  margin: 0 0 22px;\r\n  line-height: 1.7;\r\n\r\n}\r\n\r\n\r\n\/* =========================================\r\n   TARGET SUMMARY\r\n   ========================================= *\/\r\n\r\n.ra-target-summary {\r\n\r\n  padding: 20px;\r\n  margin-bottom: 25px;\r\n  background: #f7f7f7;\r\n  border-radius: 12px;\r\n  text-align: center;\r\n\r\n}\r\n\r\n.ra-target-summary span {\r\n\r\n  display: block;\r\n  font-size: 13px;\r\n  color: #666666;\r\n\r\n}\r\n\r\n.ra-target-summary strong {\r\n\r\n  display: block;\r\n  margin-top: 5px;\r\n  font-size: 25px;\r\n\r\n}\r\n\r\n.ra-target-summary small {\r\n\r\n  display: block;\r\n  margin-top: 4px;\r\n  color: #666666;\r\n  font-size: 14px;\r\n\r\n}\r\n\r\n\r\n\/* =========================================\r\n   INSIGHT\r\n   ========================================= *\/\r\n\r\n.ra-insight-content h3 {\r\n\r\n  margin: 20px 0 10px;\r\n  font-size: 21px;\r\n\r\n}\r\n\r\n.ra-insight-content p {\r\n\r\n  line-height: 1.7;\r\n\r\n}\r\n\r\n\r\n\/* =========================================\r\n   TRAINING FOCUS\r\n   ========================================= *\/\r\n\r\n.ra-training-focus {\r\n\r\n  margin-top: 25px;\r\n  padding: 20px;\r\n  background: #f7f7f7;\r\n  border-radius: 12px;\r\n\r\n}\r\n\r\n.ra-training-focus h3 {\r\n\r\n  margin-top: 0;\r\n\r\n}\r\n\r\n.ra-training-focus ul {\r\n\r\n  margin: 10px 0 0;\r\n  padding-left: 22px;\r\n\r\n}\r\n\r\n.ra-training-focus li {\r\n\r\n  margin-bottom: 8px;\r\n  line-height: 1.5;\r\n\r\n}\r\n\r\n\r\n\/* =========================================\r\n   NOTE\r\n   ========================================= *\/\r\n\r\n.ra-insight-note {\r\n\r\n  margin-top: 25px;\r\n  padding: 18px 20px;\r\n  border-left: 4px solid #f05a28;\r\n  background: #fff7f2;\r\n  line-height: 1.6;\r\n\r\n}\r\n\r\n\r\n\/* =========================================\r\n   MOBILE\r\n   ========================================= *\/\r\n\r\n@media (max-width: 600px) {\r\n\r\n  .ra-calculator-card,\r\n  .ra-training-insight {\r\n\r\n    padding: 22px;\r\n\r\n  }\r\n\r\n  .ra-calculator-card h2 {\r\n\r\n    font-size: 27px;\r\n\r\n  }\r\n\r\n  .ra-training-insight h2 {\r\n\r\n    font-size: 25px;\r\n\r\n  }\r\n\r\n  .ra-time-inputs {\r\n\r\n    grid-template-columns: 1fr;\r\n\r\n  }\r\n\r\n  .ra-result-main strong {\r\n\r\n    font-size: 38px;\r\n\r\n  }\r\n\r\n}\r\n\r\n\r\n\/* =========================================\r\n   SMALL PHONES\r\n   ========================================= *\/\r\n\r\n@media (max-width: 420px) {\r\n\r\n  .ra-result-grid {\r\n\r\n    grid-template-columns: 1fr;\r\n\r\n  }\r\n\r\n}\r\n\r\n<\/style>\r\n\r\n\r\n<script>\r\n\r\n(function() {\r\n\r\n  const distanceSelect =\r\n    document.getElementById('ra-distance');\r\n\r\n  const customDistance =\r\n    document.getElementById('ra-custom-distance');\r\n\r\n  const customInput =\r\n    document.getElementById('ra-custom-value');\r\n\r\n  const hoursInput =\r\n    document.getElementById('ra-hours');\r\n\r\n  const minutesInput =\r\n    document.getElementById('ra-minutes');\r\n\r\n  const secondsInput =\r\n    document.getElementById('ra-seconds');\r\n\r\n  const calculateButton =\r\n    document.getElementById('ra-calculate');\r\n\r\n  const paceOutput =\r\n    document.getElementById('ra-pace');\r\n\r\n  const paceUnitOutput =\r\n    document.getElementById('ra-pace-unit');\r\n\r\n  const speedOutput =\r\n    document.getElementById('ra-speed');\r\n\r\n  const speedUnitOutput =\r\n    document.getElementById('ra-speed-unit');\r\n\r\n  const distanceOutput =\r\n    document.getElementById('ra-result-distance');\r\n\r\n  const distanceUnitOutput =\r\n    document.getElementById('ra-distance-unit');\r\n\r\n  const splitList =\r\n    document.getElementById('ra-split-list');\r\n\r\n  const insightTarget =\r\n    document.getElementById('ra-insight-target');\r\n\r\n  const insightPace =\r\n    document.getElementById('ra-insight-pace');\r\n\r\n  const insightTitle =\r\n    document.getElementById('ra-insight-title');\r\n\r\n  const insightText =\r\n    document.getElementById('ra-insight-text');\r\n\r\n  const focusList =\r\n    document.getElementById('ra-focus-list');\r\n\r\n  let unit = 'km';\r\n\r\n\r\n  \/* =========================================\r\n     UNIT TOGGLE\r\n     ========================================= *\/\r\n\r\n  document.querySelectorAll('.ra-unit').forEach(function(button) {\r\n\r\n    button.addEventListener('click', function() {\r\n\r\n      document.querySelectorAll('.ra-unit').forEach(function(btn) {\r\n        btn.classList.remove('active');\r\n      });\r\n\r\n      this.classList.add('active');\r\n\r\n      unit = this.dataset.unit;\r\n\r\n      updateDistanceOptions();\r\n\r\n      calculate();\r\n\r\n    });\r\n\r\n  });\r\n\r\n\r\n  \/* =========================================\r\n     DISTANCE OPTIONS\r\n     ========================================= *\/\r\n\r\n  function updateDistanceOptions() {\r\n\r\n    if (unit === 'km') {\r\n\r\n      distanceSelect.innerHTML =\r\n\r\n        '<option value=\"5\">5K<\/option>' +\r\n        '<option value=\"10\">10K<\/option>' +\r\n        '<option value=\"21.0975\">Half Marathon<\/option>' +\r\n        '<option value=\"42.195\">Marathon<\/option>' +\r\n        '<option value=\"custom\">Custom Distance<\/option>';\r\n\r\n    }\r\n\r\n    else {\r\n\r\n      distanceSelect.innerHTML =\r\n\r\n        '<option value=\"3.10686\">5K<\/option>' +\r\n        '<option value=\"6.21371\">10K<\/option>' +\r\n        '<option value=\"13.1094\">Half Marathon<\/option>' +\r\n        '<option value=\"26.2188\">Marathon<\/option>' +\r\n        '<option value=\"custom\">Custom Distance<\/option>';\r\n\r\n    }\r\n\r\n    customDistance.style.display =\r\n      distanceSelect.value === 'custom'\r\n        ? 'block'\r\n        : 'none';\r\n\r\n  }\r\n\r\n\r\n  distanceSelect.addEventListener('change', function() {\r\n\r\n    customDistance.style.display =\r\n      this.value === 'custom'\r\n        ? 'block'\r\n        : 'none';\r\n\r\n    calculate();\r\n\r\n  });\r\n\r\n\r\n  customInput.addEventListener('input', calculate);\r\n  hoursInput.addEventListener('input', calculate);\r\n  minutesInput.addEventListener('input', calculate);\r\n  secondsInput.addEventListener('input', calculate);\r\n\r\n  calculateButton.addEventListener('click', calculate);\r\n\r\n\r\n  \/* =========================================\r\n     TIME FORMAT\r\n     ========================================= *\/\r\n\r\n  function formatTime(totalSeconds) {\r\n\r\n    const total =\r\n      Math.round(totalSeconds);\r\n\r\n    const hours =\r\n      Math.floor(total \/ 3600);\r\n\r\n    const minutes =\r\n      Math.floor((total % 3600) \/ 60);\r\n\r\n    const seconds =\r\n      total % 60;\r\n\r\n    if (hours > 0) {\r\n\r\n      return hours +\r\n        ':' +\r\n        String(minutes).padStart(2, '0') +\r\n        ':' +\r\n        String(seconds).padStart(2, '0');\r\n\r\n    }\r\n\r\n    return minutes +\r\n      ':' +\r\n      String(seconds).padStart(2, '0');\r\n\r\n  }\r\n\r\n\r\n  \/* =========================================\r\n     PACE FORMAT\r\n     ========================================= *\/\r\n\r\n  function formatPace(secondsPerUnit) {\r\n\r\n    let minutes =\r\n      Math.floor(secondsPerUnit \/ 60);\r\n\r\n    let seconds =\r\n      Math.round(secondsPerUnit % 60);\r\n\r\n    if (seconds === 60) {\r\n\r\n      minutes++;\r\n      seconds = 0;\r\n\r\n    }\r\n\r\n    return minutes +\r\n      ':' +\r\n      String(seconds).padStart(2, '0');\r\n\r\n  }\r\n\r\n\r\n  \/* =========================================\r\n     GET DISTANCE NAME\r\n     ========================================= *\/\r\n\r\n function getDistanceName(distanceKm) {\r\n\r\n  if (Math.abs(distanceKm - 5) < 0.05)\r\n    return '5K';\r\n\r\n  if (Math.abs(distanceKm - 10) < 0.05)\r\n    return '10K';\r\n\r\n  if (Math.abs(distanceKm - 21.0975) < 0.05)\r\n    return 'Half Marathon';\r\n\r\n  if (Math.abs(distanceKm - 42.195) < 0.05)\r\n    return 'Marathon';\r\n\r\n  return distanceKm.toFixed(2) + ' km';\r\n\r\n}\r\n\r\n\r\n  \/* =========================================\r\n     TRAINING INSIGHT\r\n     ========================================= *\/\r\n\r\n  function updateTrainingInsight(\r\n  distance,\r\n  totalSeconds\r\n) {\r\n\r\n  const distanceKm =\r\n    unit === 'km'\r\n      ? distance\r\n      : distance * 1.609344;\r\n\r\n  const targetTime =\r\n    formatTime(totalSeconds);\r\n\r\n  const paceSeconds =\r\n    totalSeconds \/ distance;\r\n\r\n  const paceDisplay =\r\n    formatPace(paceSeconds);\r\n\r\n  const standard5K =\r\n    Math.abs(distanceKm - 5) < 0.05;\r\n\r\n  const standard10K =\r\n    Math.abs(distanceKm - 10) < 0.05;\r\n\r\n  const standardHalf =\r\n    Math.abs(distanceKm - 21.0975) < 0.05;\r\n\r\n  const standardMarathon =\r\n    Math.abs(distanceKm - 42.195) < 0.05;\r\n\r\n  let distanceName;\r\n  let title;\r\n  let text;\r\n  let focus;\r\n\r\n\r\n  \/* =====================================\r\n     STANDARD 5K\r\n     ===================================== *\/\r\n\r\n  if (standard5K) {\r\n\r\n    distanceName = '5K';\r\n\r\n    title =\r\n      '5K: Speed and Aerobic Power';\r\n\r\n    text =\r\n      'A ' +\r\n      targetTime +\r\n      ' 5K requires you to sustain ' +\r\n      paceDisplay +\r\n      ' per ' +\r\n      (unit === 'km' ? 'kilometre' : 'mile') +\r\n      ' for the duration of the race. Developing this ability requires a combination of aerobic fitness, threshold capacity, higher-intensity work and efficient running mechanics.';\r\n\r\n    focus = [\r\n      'Aerobic development',\r\n      'Threshold training',\r\n      'VO\u2082max and higher-intensity intervals',\r\n      'Running economy',\r\n      'Speed and efficient running mechanics'\r\n    ];\r\n\r\n  }\r\n\r\n\r\n  \/* =====================================\r\n     STANDARD 10K\r\n     ===================================== *\/\r\n\r\n  else if (standard10K) {\r\n\r\n    distanceName = '10K';\r\n\r\n    title =\r\n      '10K: Aerobic Fitness and Sustainable Speed';\r\n\r\n    text =\r\n      'A ' +\r\n      targetTime +\r\n      ' 10K requires you to maintain ' +\r\n      paceDisplay +\r\n      ' per ' +\r\n      (unit === 'km' ? 'kilometre' : 'mile') +\r\n      ' while managing increasing fatigue. Training needs to develop strong aerobic fitness, threshold ability and the capacity to sustain a relatively high intensity for a prolonged period.';\r\n\r\n    focus = [\r\n      'Aerobic development',\r\n      'Threshold training',\r\n      'Higher-intensity intervals',\r\n      'Running economy',\r\n      'The ability to sustain pace under fatigue'\r\n    ];\r\n\r\n  }\r\n\r\n\r\n  \/* =====================================\r\n     STANDARD HALF MARATHON\r\n     ===================================== *\/\r\n\r\n  else if (standardHalf) {\r\n\r\n    distanceName = 'Half Marathon';\r\n\r\n    title =\r\n      'Half Marathon: Endurance and Threshold';\r\n\r\n    text =\r\n      'A ' +\r\n      targetTime +\r\n      ' half marathon requires you to maintain ' +\r\n      paceDisplay +\r\n      ' per ' +\r\n      (unit === 'km' ? 'kilometre' : 'mile') +\r\n      ' for 21.1 km. The challenge is not simply running at this pace when fresh, but developing the aerobic endurance and fatigue resistance to maintain a controlled effort for a prolonged period.';\r\n\r\n    focus = [\r\n      'Aerobic endurance',\r\n      'Threshold training',\r\n      'Longer sustained efforts',\r\n      'Pace control',\r\n      'Fatigue resistance'\r\n    ];\r\n\r\n  }\r\n\r\n\r\n  \/* =====================================\r\n     STANDARD MARATHON\r\n     ===================================== *\/\r\n\r\n  else if (standardMarathon) {\r\n\r\n    distanceName = 'Marathon';\r\n\r\n    title =\r\n      'Marathon: Endurance and Fatigue Resistance';\r\n\r\n    text =\r\n      'A ' +\r\n      targetTime +\r\n      ' marathon requires you to maintain ' +\r\n      paceDisplay +\r\n      ' per ' +\r\n      (unit === 'km' ? 'kilometre' : 'mile') +\r\n      ' for 42.2 km. The challenge is not simply reaching that pace when fresh. Training needs to develop the endurance, fatigue resistance and pacing ability required to maintain performance late in the race.';\r\n\r\n    focus = [\r\n      'Aerobic endurance',\r\n      'Long runs',\r\n      'Marathon-specific work',\r\n      'Fatigue resistance',\r\n      'Pacing and fuelling strategy'\r\n    ];\r\n\r\n  }\r\n\r\n\r\n  \/* =====================================\r\n     CUSTOM DISTANCE\r\n     ===================================== *\/\r\n\r\n  else {\r\n\r\n    \/*\r\n      Custom distances are now treated\r\n      separately from the standard races.\r\n    *\/\r\n\r\n    if (Math.abs(distanceKm - Math.round(distanceKm)) < 0.01) {\r\n\r\n      distanceName =\r\n        Math.round(distanceKm) + 'K';\r\n\r\n    } else {\r\n\r\n      distanceName =\r\n        distanceKm.toFixed(2) + ' km';\r\n\r\n    }\r\n\r\n\r\n    \/* -------------------------------------\r\n       CUSTOM UNDER 5K\r\n       ------------------------------------- *\/\r\n\r\n    if (distanceKm < 5) {\r\n\r\n      title =\r\n        distanceName +\r\n        ': Speed and Aerobic Power';\r\n\r\n      text =\r\n        'A ' +\r\n        targetTime +\r\n        ' ' +\r\n        distanceName +\r\n        ' requires you to sustain ' +\r\n        paceDisplay +\r\n        ' per ' +\r\n        (unit === 'km' ? 'kilometre' : 'mile') +\r\n        ' over a relatively short but demanding distance. Training will generally place greater emphasis on aerobic power, speed, running economy and the ability to tolerate higher intensities.';\r\n\r\n      focus = [\r\n        'Aerobic development',\r\n        'VO\u2082max and higher-intensity intervals',\r\n        'Running economy',\r\n        'Speed',\r\n        'Ability to tolerate higher intensity'\r\n      ];\r\n\r\n    }\r\n\r\n\r\n    \/* -------------------------------------\r\n       CUSTOM 5\u201310K\r\n       ------------------------------------- *\/\r\n\r\n    else if (distanceKm < 10) {\r\n\r\n      title =\r\n        distanceName +\r\n        ': Aerobic Fitness and Sustainable Speed';\r\n\r\n      text =\r\n        'A ' +\r\n        targetTime +\r\n        ' ' +\r\n        distanceName +\r\n        ' requires you to maintain ' +\r\n        paceDisplay +\r\n        ' per ' +\r\n        (unit === 'km' ? 'kilometre' : 'mile') +\r\n        ' while managing increasing fatigue. Training should develop aerobic fitness, threshold ability and the capacity to sustain a strong pace over the distance.';\r\n\r\n      focus = [\r\n        'Aerobic development',\r\n        'Threshold training',\r\n        'Higher-intensity intervals',\r\n        'Running economy',\r\n        'Sustainable speed'\r\n      ];\r\n\r\n    }\r\n\r\n\r\n    \/* -------------------------------------\r\n       CUSTOM 10\u201321.1K\r\n       ------------------------------------- *\/\r\n\r\n    else if (distanceKm < 21.1) {\r\n\r\n      title =\r\n        distanceName +\r\n        ': Endurance and Threshold';\r\n\r\n      text =\r\n        'A ' +\r\n        targetTime +\r\n        ' ' +\r\n        distanceName +\r\n        ' requires you to sustain ' +\r\n        paceDisplay +\r\n        ' per ' +\r\n        (unit === 'km' ? 'kilometre' : 'mile') +\r\n        ' for a prolonged period. As the distance increases, aerobic endurance and the ability to maintain a controlled effort become increasingly important.';\r\n\r\n      focus = [\r\n        'Aerobic endurance',\r\n        'Threshold training',\r\n        'Longer sustained efforts',\r\n        'Pace control',\r\n        'Fatigue resistance'\r\n      ];\r\n\r\n    }\r\n\r\n\r\n    \/* -------------------------------------\r\n       CUSTOM 21.1\u201342.2K\r\n       ------------------------------------- *\/\r\n\r\n    else if (distanceKm < 42.2) {\r\n\r\n      title =\r\n        distanceName +\r\n        ': Endurance and Fatigue Resistance';\r\n\r\n      text =\r\n        'A ' +\r\n        targetTime +\r\n        ' ' +\r\n        distanceName +\r\n        ' requires you to maintain ' +\r\n        paceDisplay +\r\n        ' per ' +\r\n        (unit === 'km' ? 'kilometre' : 'mile') +\r\n        ' as fatigue develops. Training needs to build aerobic endurance, fatigue resistance and the ability to manage effort over the full distance.';\r\n\r\n      focus = [\r\n        'Aerobic endurance',\r\n        'Long runs',\r\n        'Fatigue resistance',\r\n        'Sustainable pacing',\r\n        'Recovery and adaptation'\r\n      ];\r\n\r\n    }\r\n\r\n\r\n    \/* -------------------------------------\r\n       CUSTOM OVER 42.2K\r\n       ------------------------------------- *\/\r\n\r\n    else {\r\n\r\n      title =\r\n        distanceName +\r\n        ': Long-Distance Endurance';\r\n\r\n      text =\r\n        'A ' +\r\n        targetTime +\r\n        ' ' +\r\n        distanceName +\r\n        ' requires a high level of endurance and the ability to manage fatigue over a prolonged period. The further the distance increases, the more important aerobic development, long-run progression, pacing and recovery become.';\r\n\r\n      focus = [\r\n        'Aerobic endurance',\r\n        'Progressive long runs',\r\n        'Fatigue resistance',\r\n        'Pacing and fuelling',\r\n        'Recovery and adaptation'\r\n      ];\r\n\r\n    }\r\n\r\n  }\r\n\r\n\r\n  \/* =====================================\r\n     UPDATE DISPLAY\r\n     ===================================== *\/\r\n\r\n  insightTarget.textContent =\r\n    distanceName +\r\n    ' \u2014 ' +\r\n    targetTime;\r\n\r\n  insightPace.textContent =\r\n    paceDisplay +\r\n    ' ' +\r\n    (unit === 'km'\r\n      ? 'min\/km'\r\n      : 'min\/mile');\r\n\r\n  insightTitle.textContent =\r\n    title;\r\n\r\n  insightText.textContent =\r\n    text;\r\n\r\n  focusList.innerHTML = '';\r\n\r\n\r\n  focus.forEach(function(item) {\r\n\r\n    const li =\r\n      document.createElement('li');\r\n\r\n    li.textContent =\r\n      item;\r\n\r\n    focusList.appendChild(li);\r\n\r\n  });\r\n\r\n}\r\n\r\n  \/* =========================================\r\n     SPLITS\r\n     ========================================= *\/\r\n  function createSplits(\r\n  distance,\r\n  totalSeconds\r\n) {\r\n\r\n  splitList.innerHTML = '';\r\n\r\n  const distanceKm =\r\n    unit === 'km'\r\n      ? distance\r\n      : distance * 1.609344;\r\n\r\n  let checkpoints = [];\r\n\r\n\r\n  \/* =====================================\r\n     STANDARD RACE DISTANCES\r\n     ===================================== *\/\r\n\r\n  if (Math.abs(distanceKm - 5) < 0.05) {\r\n\r\n    checkpoints = [1, 2, 3, 4, 5];\r\n\r\n  }\r\n\r\n  else if (Math.abs(distanceKm - 10) < 0.05) {\r\n\r\n    checkpoints =\r\n      [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\r\n\r\n  }\r\n\r\n  else if (Math.abs(distanceKm - 21.0975) < 0.05) {\r\n\r\n    checkpoints =\r\n      [1, 5, 10, 15, 20, 21.1];\r\n\r\n  }\r\n\r\n  else if (Math.abs(distanceKm - 42.195) < 0.05) {\r\n\r\n    checkpoints =\r\n      [1, 5, 10, 15, 20, 21.1, 25, 30, 35, 40, 42.2];\r\n\r\n  }\r\n\r\n\r\n  \/* =====================================\r\n     CUSTOM DISTANCE\r\n     ===================================== *\/\r\n\r\n  else {\r\n\r\n    \/*\r\n      For custom distances:\r\n      show 1 km, then every 5 km,\r\n      followed by the finish.\r\n    *\/\r\n\r\n    if (distanceKm >= 1) {\r\n\r\n      checkpoints.push(1);\r\n\r\n    }\r\n\r\n    for (\r\n      let km = 5;\r\n      km < distanceKm;\r\n      km += 5\r\n    ) {\r\n\r\n      checkpoints.push(km);\r\n\r\n    }\r\n\r\n    \/*\r\n      Add the finish if it isn't already\r\n      one of the checkpoints.\r\n    *\/\r\n\r\n    if (\r\n      checkpoints.length === 0 ||\r\n      Math.abs(\r\n        checkpoints[checkpoints.length - 1] -\r\n        distanceKm\r\n      ) > 0.01\r\n    ) {\r\n\r\n      checkpoints.push(distanceKm);\r\n\r\n    }\r\n\r\n  }\r\n\r\n\r\n  \/* =====================================\r\n     DISPLAY SPLITS\r\n     ===================================== *\/\r\n\r\n  checkpoints.forEach(function(checkpointKm) {\r\n\r\n    if (\r\n      checkpointKm >\r\n      distanceKm + 0.01\r\n    ) {\r\n\r\n      return;\r\n\r\n    }\r\n\r\n\r\n    const time =\r\n      totalSeconds *\r\n      (checkpointKm \/ distanceKm);\r\n\r\n\r\n    let label;\r\n\r\n\r\n    \/* Kilometres *\/\r\n\r\n    if (unit === 'km') {\r\n\r\n      if (\r\n        Math.abs(checkpointKm - 21.1) < 0.01\r\n      ) {\r\n\r\n        label = '21.1 km';\r\n\r\n      }\r\n\r\n      else if (\r\n        Math.abs(checkpointKm - 42.2) < 0.01\r\n      ) {\r\n\r\n        label = '42.2 km';\r\n\r\n      }\r\n\r\n      else if (\r\n        Math.abs(checkpointKm - distanceKm) < 0.01 &&\r\n        !Number.isInteger(checkpointKm)\r\n      ) {\r\n\r\n        label =\r\n          checkpointKm.toFixed(2) +\r\n          ' km';\r\n\r\n      }\r\n\r\n      else {\r\n\r\n        label =\r\n          checkpointKm +\r\n          ' km';\r\n\r\n      }\r\n\r\n    }\r\n\r\n\r\n    \/* Miles *\/\r\n\r\n    else {\r\n\r\n      let miles =\r\n        checkpointKm \/ 1.609344;\r\n\r\n\r\n      \/*\r\n        Display familiar race\r\n        distances cleanly.\r\n      *\/\r\n\r\n      if (\r\n        Math.abs(checkpointKm - 5) < 0.05 &&\r\n        Math.abs(distanceKm - 5) < 0.05\r\n      ) {\r\n\r\n        miles = 3.1;\r\n\r\n      }\r\n\r\n      else if (\r\n        Math.abs(checkpointKm - 10) < 0.05 &&\r\n        Math.abs(distanceKm - 10) < 0.05\r\n      ) {\r\n\r\n        miles = 6.2;\r\n\r\n      }\r\n\r\n      else if (\r\n        Math.abs(checkpointKm - 21.1) < 0.05\r\n      ) {\r\n\r\n        miles = 13.1;\r\n\r\n      }\r\n\r\n      else if (\r\n        Math.abs(checkpointKm - 42.2) < 0.05\r\n      ) {\r\n\r\n        miles = 26.2;\r\n\r\n      }\r\n\r\n\r\n      label =\r\n        miles.toFixed(1) +\r\n        ' mi';\r\n\r\n    }\r\n\r\n\r\n    const row =\r\n      document.createElement('div');\r\n\r\n    row.className =\r\n      'ra-split-row';\r\n\r\n\r\n    row.innerHTML =\r\n      '<span>' +\r\n      label +\r\n      '<\/span>' +\r\n\r\n      '<strong>' +\r\n      formatTime(time) +\r\n      '<\/strong>';\r\n\r\n\r\n    splitList.appendChild(row);\r\n\r\n  });\r\n\r\n}\r\n\r\n\r\n  \/* =========================================\r\n     CALCULATE\r\n     ========================================= *\/\r\n\r\n  function calculate() {\r\n\r\n    let distance;\r\n\r\n\r\n    if (distanceSelect.value === 'custom') {\r\n\r\n      distance =\r\n        parseFloat(customInput.value);\r\n\r\n    }\r\n\r\n    else {\r\n\r\n      distance =\r\n        parseFloat(distanceSelect.value);\r\n\r\n    }\r\n\r\n\r\n    const hours =\r\n      parseInt(hoursInput.value) || 0;\r\n\r\n    const minutes =\r\n      parseInt(minutesInput.value) || 0;\r\n\r\n    const seconds =\r\n      parseInt(secondsInput.value) || 0;\r\n\r\n\r\n    if (!distance || distance <= 0)\r\n      return;\r\n\r\n\r\n    const totalSeconds =\r\n      (hours * 3600) +\r\n      (minutes * 60) +\r\n      seconds;\r\n\r\n\r\n    if (totalSeconds <= 0)\r\n      return;\r\n\r\n\r\n    const paceSeconds =\r\n      totalSeconds \/ distance;\r\n\r\n\r\n    paceOutput.textContent =\r\n      formatPace(paceSeconds);\r\n\r\n\r\n    paceUnitOutput.textContent =\r\n      unit === 'km'\r\n        ? 'min\/km'\r\n        : 'min\/mile';\r\n\r\n\r\n    const speed =\r\n      distance \/\r\n      (totalSeconds \/ 3600);\r\n\r\n\r\n    speedOutput.textContent =\r\n      speed.toFixed(2);\r\n\r\n\r\n    speedUnitOutput.textContent =\r\n      unit === 'km'\r\n        ? 'km\/h'\r\n        : 'mph';\r\n\r\n\r\n    distanceOutput.textContent =\r\n      distance.toFixed(2);\r\n\r\n\r\n    distanceUnitOutput.textContent =\r\n      unit === 'km'\r\n        ? 'km'\r\n        : 'miles';\r\n\r\n\r\n    createSplits(\r\n      distance,\r\n      totalSeconds\r\n    );\r\n\r\n\r\n    updateTrainingInsight(\r\n      distance,\r\n      totalSeconds\r\n    );\r\n\r\n  }\r\n\r\n\r\n  \/* =========================================\r\n     INITIALISE\r\n     ========================================= *\/\r\n\r\n  updateDistanceOptions();\r\n\r\n  calculate();\r\n\r\n})();\r\n\r\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Pace Calculator Enter your race distance and target time to calculate the pace you need. Kilometres Miles Race Distance 5K10KHalf [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"","ast-site-content-layout":"full-width-container","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"disabled","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"disabled","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-1541","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/runnersascend.co.uk\/sw\/wp-json\/wp\/v2\/pages\/1541","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/runnersascend.co.uk\/sw\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/runnersascend.co.uk\/sw\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/runnersascend.co.uk\/sw\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/runnersascend.co.uk\/sw\/wp-json\/wp\/v2\/comments?post=1541"}],"version-history":[{"count":26,"href":"https:\/\/runnersascend.co.uk\/sw\/wp-json\/wp\/v2\/pages\/1541\/revisions"}],"predecessor-version":[{"id":1571,"href":"https:\/\/runnersascend.co.uk\/sw\/wp-json\/wp\/v2\/pages\/1541\/revisions\/1571"}],"wp:attachment":[{"href":"https:\/\/runnersascend.co.uk\/sw\/wp-json\/wp\/v2\/media?parent=1541"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}