Network How-to

How to Test Internet Speed with CMD on Windows

Test internet speed with CMD or PowerShell on Windows 11 and 10: use the Speedtest CLI, a curl download test, ping for latency and netsh for Wi-Fi rate.

How to Test Internet Speed with CMD on Windows
On this page
    Quick answer

    Windows has no built-in speed test command, but you can test internet speed from CMD in two ways. Install Ookla's free Speedtest CLI with winget install Ookla.Speedtest.CLI and run speedtest for download, upload and ping. Or time a download with the built-in curl. Use ping -n 20 1.1.1.1 for latency and netsh wlan show interfaces for your Wi-Fi link rate.

    Time: 2–5 minutes · Cost: free · Works on: Windows 11 and Windows 10

    Maybe you are on a server without a browser, you want to log results in a script, or you just prefer the keyboard. Whatever the reason, you can test internet speed with CMD on Windows using tools that are either built in or one command away. This guide covers four methods, from a full speed test to quick latency checks, and shows how to read the results.

    Method 1: Ookla Speedtest CLI (Best)

    The official command-line version of Speedtest measures download, upload, ping, jitter and packet loss.

    1. Install it with winget

      Command
      winget install Ookla.Speedtest.CLI

      winget is included in Windows 11 and current Windows 10. Close and reopen Terminal after installing so the command is found.

    2. Run the test

      Command
      speedtest --accept-license --accept-gdpr

      The flags are needed only the first time. After that, plain speedtest works.

    3. Pick a server or log results (optional)

      Commands
      speedtest -L
      speedtest -s 12345
      speedtest -f csv >> speedlog.csv

      -L lists nearby servers, -s uses one by ID, and -f csv outputs a line you can append to a log file for scheduled tests.

    Method 2: Test Internet Speed in CMD with curl

    Windows 10 and 11 include curl. Download a test file and let curl report the average speed. This measures download only.

    Command Prompt
    curl -o NUL -w "%{speed_download}" https://speed.cloudflare.com/__down?bytes=100000000

    The result is in bytes per second. Multiply by 8 and divide by 1,000,000 for Mbps: 12,500,000 means 100 Mbps. In PowerShell type curl.exe instead of curl, because curl there is an alias for a different command. Why bytes and bits differ is explained in Mbps vs MB/s.

    Method 3: PowerShell One-Liner in Mbps

    This downloads 100 MB to a temp file, times it and prints the speed in Mbps directly:

    PowerShell
    $ProgressPreference = 'SilentlyContinue'
    $t = Measure-Command { Invoke-WebRequest 'https://speed.cloudflare.com/__down?bytes=100000000' -OutFile "$env:TEMP\st.bin" -UseBasicParsing }
    [math]::Round(800 / $t.TotalSeconds, 1)
    Remove-Item "$env:TEMP\st.bin"

    100 MB is 800 megabits, so 800 divided by the seconds gives Mbps. Turning off the progress bar matters: in Windows PowerShell 5.1 it slows downloads a lot.

    Method 4: Latency and Wi-Fi Rate

    Speed is only part of the story. For latency and stability:

    Commands
    ping -n 20 1.1.1.1
    pathping 1.1.1.1
    netsh wlan show interfaces
    • ping shows the average and maximum round-trip time. A big gap means jitter; see what ping and jitter are.
    • pathping tests every hop to the server for about five minutes and shows where packets are lost.
    • netsh wlan show interfaces shows Wi-Fi signal and Receive/Transmit rate, the link speed to your router. Your internet speed cannot be higher.

    Command Line vs a Speed Test App

    Comparison of command line speed test methods and a speed test app
    MethodDownloadUploadPing/jitterHistory
    Speedtest CLIYesYesYesVia CSV log
    curl / PowerShellYesNoNoNo
    ping / pathpingNoNoYesNo
    Test Net Speed appYesYesYesSaved automatically

    If you want results without typing, Test Net Speed runs the full test in one click and keeps a history of every result, which makes it easy to spot slow evenings or compare Wi-Fi with Ethernet.

    Test Net Speed dashboard showing download, upload, ping and jitter results
    Download, upload, ping and jitter from a single click.
    Network tools running a ping test
    Built-in tools run ping tests without the command line.

    Is Your Result Good?

    Compare the download number to your plan: 80–90% of the advertised speed on a cable is normal. Whether that speed is enough depends on your household; see how much internet speed you need.

    Tips for Accurate Command-Line Results

    • Use a cable for the test. Wi-Fi results change with every step you take. Test on Ethernet to measure the line itself, then on Wi-Fi to measure your wireless.
    • Stop other traffic. Pause downloads, cloud sync and streaming on every device, or the test measures what is left over.
    • Run it three times. Take the middle result. One test can hit a busy server or a burst of traffic.
    • Test at different times. A good result at 10 am and a poor one at 9 pm points to evening congestion at your ISP, which is useful evidence when you contact support.
    • Check the link first. If netsh wlan show interfaces reports a 144 Mbps receive rate, you cannot get 500 Mbps over that Wi-Fi link no matter what the plan says.

    FAQ

    Is there a built-in speed test command in Windows?

    No. Windows has no single command for download and upload speed. Use the Speedtest CLI or time a download with curl.

    Does ping show internet speed?

    No. Ping measures latency (delay), not bandwidth. A fast connection can have high ping and a slow one low ping.

    Why is the curl result lower than a browser speed test?

    curl uses a single connection, while most speed tests open several at once. On fast plans a single connection may not reach full speed.

    Can I schedule speed tests?

    Yes. Put speedtest -f csv >> C:\logs\speed.csv in a batch file and run it hourly with Task Scheduler.

    Conclusion

    To test internet speed with CMD, install the Speedtest CLI with winget for a complete result, or use curl or PowerShell for a quick download check with no install. Add ping and netsh to check latency and Wi-Fi link rate. Explore more network apps for Windows.

    Get it freeTest Net Speed

    Try Test Net Speed

    Internet speed test with ping, jitter, saved history and network tools.

    Get it fromMicrosoft Store