The quick version divides annual salary by 2,080 (40 hours × 52 weeks). But that ignores paid time off — if you actually work fewer paid hours, your true hourly value is higher.
For contract work, gross up: a salaried role's benefits, payroll taxes, and PTO often add 25-40% that a contractor must cover themselves, so a like-for-like contract rate is well above the simple divide.
Run both the naive and the adjusted number so you can compare an offer honestly against your current pay.