The SUBTOTAL function performs calculations while excluding hidden rows. For instance, =SUBTOTAL(9, A1:A10) calculates the sum, ignoring any filtered-out rows.