Skip to content

Instantly share code, notes, and snippets.

View cabassi's full-sized avatar

Roberto Cabassi Bombardieri cabassi

View GitHub Profile
@f-steff
f-steff / excel formulas.md
Last active October 14, 2024 11:14
Excel formulas to calculate IP values such as Netmask, IP range start, IP range end, Broadcast IP, Number of hosts.

Excel formulas to calculate IP values - Works in Excel and Google Sheet.

Updated 2023-12-11: Hosts calculation updated to support CIDR or 31 and 32.

Prerequisites:

  • A1 contains an IP address, such as 10.0.0.2
  • B1 contains the number of bits in the netmask (CIDR) such as 24

The below formulas then go into C1, D1 etc. to perform the various calculations. Some calculations depends on other calculations.