Date.UTC() is a static method that builds epoch milliseconds from UTC calendar parts—year, month, day, hour, and so on. Wrap the result in new Date(...) for a Date object, then verify with toISOString().
01
Static
Date.UTC()
02
Returns ms
Epoch number
03
Month 0
Jan = 0
04
UTC parts
Not local
05
new Date
Wrap ms
06
Compare
vs local ctor
Fundamentals
Introduction
When you write new Date(2026, 2, 15), JavaScript treats those numbers as local calendar fields. When you need a specific instant in Coordinated Universal Time regardless of the user’s timezone, Date.UTC() interprets the same-style arguments as UTC instead.
The method returns a number—milliseconds since the Unix epoch—not a Date object. Pass that number to new Date(...) or setTime(). Pair with toUTCString() and toISOString() to inspect the result.
Concept
Understanding the Date.UTC() Method
Date.UTC(year, month[, day[, hour[, minute[, second[, millisecond]]]]]) computes one UTC instant and returns its epoch milliseconds:
Static — call on the Date constructor, not on an instance.
UTC interpretation — all supplied parts are UTC, not local.
Zero-indexed month — 0 = January, 11 = December.
Defaults — omitted day becomes 1; omitted time fields become 0.
Overflow — out-of-range values roll over (month 13 becomes next year).
💡
Beginner Tip
March is month index 2, not 3. A common bug is passing human month numbers directly into Date.UTC() without subtracting one.
Because both values are absolute UTC milliseconds, subtraction avoids local DST surprises. For calendar-month math in local time, use dedicated date libraries.
Applications
🚀 Common Use Cases
Tutorial examples — predictable UTC instants in docs and tests.
Deadline comparisons — compare now against a fixed UTC milestone.
Chart axes — generate UTC tick marks from numeric parts.
Server schedules — encode “every day at 09:00 UTC” consistently.
Unit tests — assert ISO output after UTC construction.
setTime input — pass Date.UTC(...) to move an existing Date.
🧠 How Date.UTC() Computes Epoch Milliseconds
1
Apply defaults
Missing day becomes 1; missing time fields become 0.
defaults
2
Normalize overflow
Out-of-range months or days roll forward/backward.
normalize
3
UTC instant
Engine resolves the UTC calendar clock to one instant.
UTC
4
🔢
Return ms
Epoch milliseconds are returned—wrap with new Date() if needed.
Important
📝 Notes
Static method—call Date.UTC(), not date.UTC().
Returns a number, not a Date object.
Months are zero-indexed; March is 2.
Arguments are UTC; local constructor uses local timezone.
Overflow rolls (for example, month 12 becomes January next year).
Date.UTC() has been available since ES1 alongside the Date constructor. It works in every JavaScript environment.
✓ Baseline · ES1
Date.UTC()
Supported everywhere JavaScript runs — browsers, Node.js, Deno, and Bun. No polyfill required.
100%Universal API
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
Date.UTC()Universal
Bottom line: Safe everywhere. Remember zero-indexed months, UTC interpretation, and wrap with new Date().
Wrap Up
Conclusion
Date.UTC() turns UTC calendar parts into epoch milliseconds you can store, compare, or pass to new Date(). It is the reliable builder when your spec is written in UTC rather than local time.
Next, learn valueOf() for numeric coercion of Date objects, or review toUTCString() for readable UTC text output.
Subtract 1 from human month numbers before calling Date.UTC()
Wrap with new Date(Date.UTC(...)) when you need a Date instance
Verify results with toISOString() in tests
Use UTC construction for cross-timezone deadlines
Subtract two Date.UTC() values for portable millisecond diffs
❌ Don’t
Assume Date.UTC() returns a Date object
Pass month 3 when you mean March (use 2)
Mix up Date.UTC() with the local new Date(y, m, d) constructor
Use Date.UTC() when you only need the current time—use Date.now()
Forget that overflow changes month/year unexpectedly if inputs are sloppy
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about Date.UTC()
Your foundation for building UTC instants from numeric parts.
5
Core concepts
📝01
Static
Date.UTC()
API
🔢02
Returns ms
Epoch number.
Output
📅03
Month 0
Jan = 0.
Index
🌐04
UTC parts
Not local.
Timezone
📦05
new Date
Wrap ms.
Object
❓ Frequently Asked Questions
A number: milliseconds since the Unix epoch (January 1, 1970 00:00:00 UTC) for the UTC date-time built from the arguments. It does not return a Date object.
Wrap it: new Date(Date.UTC(year, month, day, hour, minute, second, ms)). The Date object stores the same instant; local getters will reflect your timezone.
Yes. January is 0, February is 1, …, December is 11. March is 2, not 3.
Date.UTC() interprets all parts as UTC. new Date(year, month, …) interprets parts in local time. The same numbers often produce different instants.
Date.now() returns the current epoch milliseconds. Date.UTC() builds milliseconds for a specific UTC calendar date and time you pass in.
Omitted day defaults to 1; omitted hour, minute, second, and millisecond default to 0. So Date.UTC(2026, 0) is UTC midnight on January 1, 2026.
Did you know?
new Date(Date.UTC(2026, 2, 15)).getTime() equals Date.UTC(2026, 2, 15)—the static method and the Date instance describe the same instant once wrapped.