The quickest way to see how long Windows has been running is to open Command Prompt and type net statistics workstation. The first line of output shows "Statistics since" followed by the date and time the computer last booted, so you can work out the uptime by subtracting that from the current time. For a more precise figure, PowerShell's (Get-CimInstance Win32_OperatingSystem).LastBootUpTime returns the exact boot timestamp, and systeminfo includes a "System Boot Time" line. No extra software is needed, but you may need administrator rights for some commands depending on how your account is set up.

What You'll Need

  • A Windows PC running Windows 10 or Windows 11 (the commands also work on Windows 8.1 and 7, though menu labels may differ slightly).
  • Access to Command Prompt or PowerShell. A standard user account is usually enough for net statistics and systeminfo; PowerShell's CIM cmdlet may require elevation on some systems.
  • No downloads or third-party tools are required.

Step-by-Step

  1. Open Command Prompt. Press the Windows key, type cmd, and select "Command Prompt" from the results. Alternatively, press Win + R, type cmd, and press Enter. If you need administrator rights, right-click the result and choose "Run as administrator".
  2. Run the net statistics command. At the prompt, type net statistics workstation and press Enter. The output begins with a line like "Workstation Statistics for \\COMPUTERNAME" and then "Statistics since 10/15/2024 8:32:14 AM". That timestamp is the last boot time, not the uptime itself.
  3. Calculate uptime. Subtract the "Statistics since" time from the current date and time. For example, if the current time is 2:00 PM on October 18 and the statistics line says October 15 at 8:32 AM, the uptime is roughly 3 days, 5 hours, and 28 minutes. You can use a calculator or an online time-difference tool if you prefer.
  4. Get a more precise boot time with PowerShell. Open PowerShell (search for "PowerShell" in the Start menu). Type (Get-CimInstance Win32_OperatingSystem).LastBootUpTime and press Enter. This returns the exact date and time the operating system started. Subtract that from Get-Date to get the uptime as a timespan. For a one-liner, run (Get-Date) - (Get-CimInstance Win32_OperatingSystem).LastBootUpTime, which prints days, hours, minutes, and seconds directly.
  5. Use systeminfo as an alternative. In Command Prompt or PowerShell, type systeminfo and press Enter. Scroll to the line labelled "System Boot Time". This command can take a few seconds to gather data, but it works on all supported Windows versions and shows the boot time in a clear format.
  6. Check Task Manager for a quick visual. Press Ctrl + Shift + Esc to open Task Manager. On Windows 10 and 11, open the Performance tab and select CPU. The "Up time" is displayed near the bottom of the CPU graph. This is the fastest way to see uptime without typing a command, though it shows days, hours, minutes, and seconds rather than the exact boot timestamp.
  7. Record or note the result. If you need the uptime for troubleshooting or a support ticket, copy the PowerShell output or take a screenshot. The timespan format from PowerShell (for example, "3.05:28:14.1234567") means 3 days, 5 hours, 28 minutes, and 14 seconds.

Common Mistakes

  • Confusing "Statistics since" with uptime. The net statistics workstation command shows the last boot time, not the elapsed time. You must subtract it from the current time to get uptime.
  • Expecting a single "uptime" command. Windows does not include a built-in uptime command like Linux does. Using uptime in Command Prompt returns an error. Use the methods above instead.
  • Running PowerShell cmdlets in Command Prompt. Commands like Get-CimInstance only work in PowerShell. If you type them into Command Prompt, you will get a "not recognized" error.
  • Ignoring Fast Startup. On PCs with Fast Startup enabled, a shutdown followed by a power-on may not reset the boot time in the same way a full restart does. If uptime looks longer than expected, perform a full restart (Start > Power > Restart) and check again.
  • Forgetting time zones. The boot time is shown in local time. If you compare it with a UTC timestamp from another tool, convert one of them first.

Tips

  • Use PowerShell's one-liner (Get-Date) - (Get-CimInstance Win32_OperatingSystem).LastBootUpTime for the clearest uptime figure, including seconds.
  • If you need uptime regularly, create a shortcut or a small batch file that runs the command and pauses so you can read the output.
  • Task Manager's Performance tab is the quickest check for a rough uptime without opening a terminal.
  • Uptime resets on a full restart, not always on shutdown with Fast Startup. Use Restart when you need a clean boot time.
  • The systeminfo command also lists other useful details like OS version and install date, so it can double as a quick system report.

Troubleshooting

  • "Access denied" when running net statistics. Open Command Prompt as administrator (right-click > Run as administrator) and try again. Some domain policies restrict this command for standard users.
  • PowerShell cmdlet returns an error about CIM. Ensure you are running PowerShell, not Command Prompt. If the error mentions the service being unavailable, restart the Windows Management Instrumentation service (type services.msc in the Run dialog, find "Windows Management Instrumentation", and restart it). If that fails, run winmgmt /verifyrepository in an elevated Command Prompt to check the repository.
  • Boot time looks wrong or unchanged after a restart. Fast Startup can cause this. Perform a full restart by holding Shift while clicking Restart, or disable Fast Startup in Control Panel > Power Options > Choose what the power buttons do. Note that disabling Fast Startup may slightly increase boot time.
  • Command output is cut off or scrolls too fast. Pipe the output to a file: net statistics workstation > uptime.txt and open the file in Notepad. Or use systeminfo | findstr /C:"System Boot Time" to show only the relevant line.
  • Task Manager shows a different uptime than the command line. Small differences can occur because Task Manager may round or update at intervals. Trust the PowerShell or systeminfo timestamp for accuracy.

Frequently Asked Questions

Is there a built-in uptime command in Windows?

No. Windows does not include a command literally called uptime. You use net statistics workstation, systeminfo, or PowerShell's Get-CimInstance to find the boot time and calculate uptime.

Why does my uptime not reset after shutdown?

Windows Fast Startup (also called hybrid shutdown) can keep the kernel session alive across a shutdown, so the boot time may not update. A full Restart resets it. You can disable Fast Startup in Power Options if you prefer a clean boot every time.

Can I see uptime without opening a command prompt?

Yes. Open Task Manager, go to the Performance tab, and select CPU. The uptime is shown near the bottom of the graph. This works on Windows 10 and 11.

Does the net statistics command require administrator rights?

It usually works for standard users, but some organizations restrict it. If you see an access denied error, run Command Prompt as administrator.

What format does PowerShell use for uptime?

The subtraction returns a TimeSpan object displayed as days.hours:minutes:seconds.fraction, for example 3.05:28:14.1234567 means 3 days, 5 hours, 28 minutes, and 14 seconds. You can format it with .ToString() if needed.

Does uptime include time spent in sleep or hibernation?

The boot time is set when Windows starts, so sleep and hibernation do not reset it. Uptime therefore includes time the PC was asleep, which can make it look longer than the time the PC was actively in use.