{
  "id": "travel-time",
  "version": "6655325b2cbb",
  "status": "published",
  "name": "Travel Time Calculator",
  "question": "What is my travel time?",
  "summary": "Works out the travel time for a distance at an average speed, adds time for stops, and gives the arrival time from a departure time.",
  "category": "everyday-life",
  "subcategory": "travel-and-fuel",
  "url": "https://www.acalculator.org/everyday-life/travel-time-calculator",
  "markdown": "https://www.acalculator.org/everyday-life/travel-time-calculator.md",
  "kind": "function",
  "method": "moving time = distance ÷ average speed; total = moving time (rounded to the minute) + stop minutes; arrival = departure time + total.",
  "assumptions": [
    "The average speed is your average while moving, over the whole trip; traffic and speed changes are in it.",
    "Moving time is rounded to the nearest minute, half a minute up.",
    "The arrival time is in the time zone you leave from; it does not change for time zones or daylight saving time."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "d": {
        "title": "Distance",
        "description": "How far you travel.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 100000000
      },
      "s": {
        "title": "Average speed",
        "description": "Your average speed over the whole trip while moving.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "speed",
        "minimum": 0.2777777777777778,
        "maximum": 1000
      },
      "stops": {
        "title": "Stops (minutes)",
        "description": "Total minutes for breaks, fuel and meals along the way. Leave empty for none.",
        "type": "integer",
        "minimum": 0,
        "maximum": 100000
      },
      "dep": {
        "title": "Departure time",
        "description": "Optional: when you leave, to see when you arrive.",
        "type": "string",
        "pattern": "^\\d{2}:\\d{2}(:\\d{2})?$"
      }
    }
  },
  "outputs": {
    "total": {
      "label": "Total travel time",
      "description": "Moving time plus stops, rounded to the minute.",
      "format": "duration"
    },
    "moving": {
      "label": "Moving time",
      "description": "Distance ÷ average speed, rounded to the minute.",
      "format": "duration"
    },
    "hours": {
      "label": "Moving time in hours",
      "description": "Distance ÷ average speed, in decimal hours.",
      "format": "number"
    },
    "arrive": {
      "label": "Arrival time",
      "description": "The departure time plus the total travel time (the same time zone).",
      "format": "time"
    },
    "days": {
      "label": "Arrival day",
      "description": "Whether you arrive on the day you leave or a later day.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "d": 402336,
      "s": 26.8224
    },
    "outputs": {
      "total": {
        "hours": 4,
        "minutes": 10
      },
      "moving": {
        "hours": 4,
        "minutes": 10
      },
      "hours": 4.166666666666667
    },
    "text": "Traveling 250 mi at 60 mph takes 4 hours, 10 minutes in all (4 hours, 10 minutes moving)."
  },
  "examples": [
    {
      "given": {
        "d": 402336,
        "s": 26.8224
      },
      "expect": {
        "total": {
          "hours": 4,
          "minutes": 10
        },
        "hours": 4.166666666666667
      },
      "source": "hand calculation in content.mdx: 250 ÷ 60 = 4.1667 h = 4 h 10 min; OpenStax, University Physics Volume 1, §3.2 Instantaneous Velocity and Speed (average speed = total distance ÷ elapsed time). https://openstax.org/books/university-physics-volume-1/pages/3-2-instantaneous-velocity-and-speed, retrieved 2026-10-02",
      "tolerance": 1e-12
    },
    {
      "given": {
        "d": 300000,
        "s": 27.77777777777778,
        "stops": 30,
        "dep": "08:15"
      },
      "expect": {
        "moving": {
          "hours": 3,
          "minutes": 0
        },
        "total": {
          "hours": 3,
          "minutes": 30
        },
        "arrive": "11:45",
        "days": "The same day"
      },
      "source": "hand calculation in content.mdx: 300 km ÷ 100 km/h = 3 h, + 30 min of stops = 3 h 30 min; 8:15 + 3:30 = 11:45; OpenStax, University Physics Volume 1, §3.2 Instantaneous Velocity and Speed (average speed = total distance ÷ elapsed time). https://openstax.org/books/university-physics-volume-1/pages/3-2-instantaneous-velocity-and-speed, retrieved 2026-10-02"
    },
    {
      "given": {
        "d": 1931212.8,
        "s": 29.0576,
        "stops": 120,
        "dep": "20:00"
      },
      "expect": {
        "moving": {
          "hours": 18,
          "minutes": 28
        },
        "total": {
          "hours": 20,
          "minutes": 28
        },
        "arrive": "16:28",
        "days": "The next day"
      },
      "source": "hand calculation in content.mdx: 1,200 ÷ 65 = 18.4615 h = 18 h 27.7 min, rounded to 18 h 28 min; + 2 h; 20:00 + 20:28 = 16:28 the next day; OpenStax, University Physics Volume 1, §3.2 Instantaneous Velocity and Speed (average speed = total distance ÷ elapsed time). https://openstax.org/books/university-physics-volume-1/pages/3-2-instantaneous-velocity-and-speed, retrieved 2026-10-02"
    }
  ],
  "sources": [
    "OpenStax, University Physics Volume 1, §3.2 Instantaneous Velocity and Speed (average speed = total distance ÷ elapsed time). https://openstax.org/books/university-physics-volume-1/pages/3-2-instantaneous-velocity-and-speed (retrieved 2026-10-02)"
  ],
  "related": [
    "speed",
    "distance",
    "gas",
    "mileage"
  ],
  "changelog": []
}
