Skip to main content

How to calculate average speed from distance and time in Excel?

Author Xiaoyang Last modified

In many practical situations, you may need to analyze driving records, delivery schedules, or work logs that record both the distance traveled and the duration in time format, such as hours and minutes. Calculating the average speed is a common requirement for logistics staff, engineers, students, and office professionals. Typically, the basic mathematical formula is:

Average Speed = Distance / Time

In Excel, if your data contains time in standard numeric hours (for example, 2 hours), you can easily perform this calculation directly. However, real-world data is often recorded in Excel using time formats (such as 1:20  for 1 hour and 20 minutes), which requires a slightly different approach. If you simply divide distance by the time in Excel without adjusting for the time format, you may get inaccurate results because Excel treats time values as fractions of a day.

In this article, we will cover how to accurately calculate average speed when your time data is either in numeric or time format, and also present what to do if you have separate start and end time columns. Below are detailed steps and useful solutions for these scenarios, including practical formula usage. These methods are suitable for tracking delivery speed, sports results, vehicle fleet reporting, and any other context where time and distance need to be analyzed together.

Calculate average speed from distance and time with formulas

calculate average speed


Calculate average speed from distance and time with formulas

If your worksheet contains a distance column and a time column (recorded in time format such as hh:mm), you can use Excel formulas to compute the average speed. These formulas will help you convert and interpret time data correctly to ensure accurate results.

1. Select a blank cell (for example, C2) where you want to display the average speed result. Enter the following formula:

=A2/(B2*24)

Here, A2 refers to the distance (for example, kilometers or miles), and B2 refers to the time in Excel's time format (such as 1:30, which represents one and a half hours). This formula divides the distance by the time (converted from a fraction of a day to hours by multiplying by 24).

2. After typing the formula, press Enter to confirm. Then, drag the fill handle down from the cell’s corner to apply the formula to other rows, so you obtain the average speed for each record in your list.

apply a formula to Calculate average speed

Note: If your distance or time data is not in columns A and B, adjust the references in the formula accordingly.

Important Tip: After calculating, the result may appear in the time format, which can be misleading. To show the average speed as a numeric value (such as kilometers per hour or miles per hour), you need to change the cell format.

3. Select the calculated cells, then go to the Home tab, locate the Number group, click the Number Format dropdown, and select General. This allows the results to appear as regular numbers, ensuring they accurately represent speed values.

change the cell format to general

If you encounter formulas returning unexpected results (such as extremely small numbers or time-formatted output), it is most likely due to not converting the time format to numeric hours. Always review your formula and cell formatting for correctness.

Usage Scenario: This method is ideal if you already have the elapsed time recorded for each activity. It supports both personal and business tracking tasks, for example, measuring average delivery speed per route.
Limitation: This approach expects a single time value representing the total duration for each event. If you only have a start time and end time, see the next solution.

Note: If your worksheet contains separate columns for start time and end time instead of a single duration, you’ll need to calculate the elapsed time first and then work out the average speed.

 calculate the average speed based on two lists of start time and end time

For these cases, you can use:

1. Select a blank cell (e.g., D2), then enter the following formula to compute the average speed based on separate start and end times:

=A2/(24*(C2-B2))

In this formula:
A2 is the distance.
B2 is the start time.
C2 is the end time.
The difference (C2-B2) yields the elapsed time in day fractions, which is converted to hours by multiplying by 24.

2. Press Enter, then copy this formula down to fill other rows as needed to obtain average speeds across the dataset.

apply a formula to Calculate average speed based on two lists of start time and end time

3. To display the speed result as a standard numeric value, highlight the formula cells, go to the Number Format dropdown under the Home tab, and choose General. This ensures the output is shown as a regular number representing speed.

format the formula cells format as general to get the result

Make sure the end time is always after the start time, and both times are formatted as Time. If the result is an error or negative number, double-check the time values for any data entry mistakes.

Usage Scenario: This formula method is particularly helpful when you routinely record the exact time a task starts and ends, such as project tracking or transport logs. It provides flexibility by automatically calculating elapsed time for your speed computations.
Limitation: This approach requires both timestamps to be present and accurate. It won’t work as intended if times cross midnight unless the formula or data is adjusted.

Practical Tips:

  • Check your distance units throughout your dataset to ensure consistency (e.g., always kilometers or always miles).
  • If your times include dates in addition to times, the same formula will work. Ensure cells are formatted as Date & Time as necessary.
  • If you receive a #DIV/0! error, it likely means the time value is zero or the start and end times are the same.
  • If you want to show the result with custom units (e.g., "km/h" or "mi/h"), you can use the Custom Number Format and enter 0" km/h" as the format string.

 

Troubleshooting and Suggestions: When your computed speeds do not seem correct, review the input time format and ensure the formula multiplies by 24 (to convert day fractions to hours). Whenever possible, confirm that your raw times are in a consistent Excel-recognized time format. If working with a large number of records or recurring analyses, consider creating a template with built-in formulas for automatic calculations.

a screenshot of kutools for excel ai

Unlock Excel Magic with Kutools AI

  • Smart Execution: Perform cell operations, analyze data, and create charts—all driven by simple commands.
  • Custom Formulas: Generate tailored formulas to streamline your workflows.
  • VBA Coding: Write and implement VBA code effortlessly.
  • Formula Interpretation: Understand complex formulas with ease.
  • Text Translation: Break language barriers within your spreadsheets.
Enhance your Excel capabilities with AI-powered tools. Download Now and experience efficiency like never before!

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!