The 540 area code covers Roanoke, Fredericksburg and 97 more places in Virginia.
Area code 540 is in Virginia, on Eastern Time. In the 540 area, phone numbers are given out most in the City of Roanoke, then the City of Fredericksburg and the City of Harrisonburg. It has been in service since July 15, 1995. 826 covers the same area, so two neighbours can have different area codes.
- Where
- 8 counties in Virginia, mostly City of Roanoke, City of Fredericksburg and City of Harrisonburg
- Time zone
- Eastern Time
- In service since
- July 15, 1995
- Shares its area with
- 826 (since 2022)
- Prefixes in use
- 786
- How to dial
- Local calls need all 10 digits: 540-555-0142.
Find out who called you from a 540 number.
Enter the full 10-digit number to see who it is listed to and the city and state on the listing. It is the same free check as our who called me lookup. To see only the caller ID name on the number, use our free CNAM lookup. To see whether it is a mobile, a landline or a VoIP line, use our free VoIP checker. To see which carrier a (540) number is on today, use our free carrier lookup.
Works for US & Canada numbers. Enter a 10-digit number, e.g. (415) 555-0132.
Free & rate-limited. No signup required to try.
Roanoke holds 13% of the phone prefixes in area code 540.
A prefix is the three digits after the area code, and NANPA assigns each one to a town. Counting the 786 prefixes in use shows where 540 numbers are actually given out.
- Roanoke105 prefixes, 13%
- Fredericksburg63 prefixes, 8%
- Harrisonburg43 prefixes, 5%
- Winchester38 prefixes, 5%
- Culpeper33 prefixes, 4%
- Staunton29 prefixes, 4%
- Blacksburg21 prefixes, 3%
- Warrenton18 prefixes, 2%
Also served: Radford, Stafford, Christiansburg and Waynesboro and 87 smaller places.
Of the carriers named here, AT&T Mobility holds the most phone number prefixes in area code 540: 66 of 786.
NANPA, which runs the North American numbering plan, assigns each prefix (the three digits after the area code) to one carrier. Here is how the 786 prefixes in use in 540 divide between carriers; holders this page does not name are grouped as other carriers.
| Carrier | Prefixes | Share |
|---|---|---|
| AT&T MobilityMobile network | 66 | 8% |
| T-MobileMobile network | 64 | 8% |
| Level 3 (Lumen)Lumen's business and wholesale network | 50 | 6% |
| BrightspeedLandline company | 28 | 4% |
| Metro by T-MobileT-Mobile's prepaid brand | 25 | 3% |
| BandwidthSupplies numbers to VoIP and app-based phone services | 24 | 3% |
| 44 other carriers | 529 | 67% |
80% of these prefixes are pooled, which means the blocks of 1,000 numbers inside them can belong to other carriers. Any number can also have been moved to another carrier since, so this shows who holds the prefixes, not who serves a given number.
Want the carrier of one exact number? Our free carrier lookup checks it, because numbers move between carriers.
Source: NANPA central office code assignments, October 1, 2026.
540 has been split once and overlaid once since 1995.
1995
540 starts on July 15, 1995, split off from 703.
2001
On September 1, 2001, 276 splits off and takes part of the 540 area.
2022
On June 14, 2022, 826 is added on top of 540, so new numbers here can get either code.
A 540 number on your screen can still be a scam, because caller ID is easy to fake.
- Let an unknown call go to voicemail. A real caller leaves a message; a robocaller usually does not.
- Look the number up with the box above before you call back, because calling back tells a robocaller your line is live.
- Hang up on anyone who wants gift cards, crypto or a wire transfer, or asks you to read out a code that was just texted to you.
- Report unwanted robocalls at reportfraud.ftc.gov, or paste a suspicious message into our free scam checker.
The area codes closest to 540 are 434, 804 and 304.
This list measures the distance between the centres of each area, across state lines, and shows codes that share one area together.
These are the questions people ask most about area code 540.
Where is area code 540?
540 covers Roanoke, Fredericksburg, Harrisonburg and Winchester and 95 more places in Virginia. In the 540 area, phone numbers are given out most in the City of Roanoke, then the City of Fredericksburg and the City of Harrisonburg.
What state is area code 540 in?
Virginia. 540 is a Virginia area code on Eastern Time.
What cities use area code 540?
The places holding the most 540 prefixes are Roanoke, Fredericksburg, Harrisonburg, Winchester, Culpeper, Staunton, Blacksburg and Warrenton, out of 99 places in all. The count comes from NANPA's prefix assignments as of October 1, 2026.
Which phone company owns area code 540?
No single phone company owns 540. NANPA's records list its 786 prefixes across many carriers, and the ones named on this page include AT&T Mobility, T-Mobile and Level 3 (Lumen). Numbers move between carriers, so check one exact number with a carrier lookup.
What time zone is area code 540 in?
540 is on Eastern Time.
When did area code 540 start?
540 went into service on July 15, 1995, when it was split off from 703.
Is 540 the same area as 826?
Yes. 826 (since 2022) covers the same ground as 540. Nobody's number changed when it was added; new lines simply get whichever code has numbers left, so two neighbours can have different codes.
How do I dial a 540 number?
Local calls need all 10 digits: 540-555-0142.
Is 540 a toll-free number?
No. 540 is a regular area code for Roanoke and Fredericksburg in Virginia, not a toll-free one. The toll-free codes in North America are 800, 833, 844, 855, 866, 877 and 888.
What area codes are near 540?
The closest are 434 (Charlottesville, Virginia), 804/686 (Richmond, Virginia), 304/681 (Charleston, West Virginia) and 301/240/227 (Washington, D.C. suburbs, Maryland), measured between the centres of each area.
Who called me from a 540 number?
Enter the full 10-digit number in the lookup above. It returns the listed owner where there is a public record, where the number is registered, and whether it is a mobile, a landline or a VoIP line.
Is area code 540 a scam?
540 is a real Virginia area code, so the code itself is not a warning sign. Scam callers fake local-looking numbers on purpose, so judge the call by what the caller asks for, and look the number up before calling back.
Put this lookup on your site: our free area code widget takes two lines of code and shows any US area code's state, time zone and local time.
Source: NANPA, the North American Numbering Plan Administrator: its area code database and prefix assignments, as of October 1, 2026.