Work out cross validation folds instantly with clear inputs, formula shown and shareable results.
k-fold cross-validation splits the data into k equal parts, trains on k-1 of them and validates on the one held out, repeating until every row has been validated exactly once. Each fit therefore sees (k-1)/k of the data, and the total compute cost is k times a single fit, multiplied again if you repeat the whole procedure with different shuffles to reduce variance.
Fold arithmetic
validation rows = floor(rows / k); training rows = rows - validation rows; fits = k x repeats
Higher k means more training data per fit and less bias, but the folds overlap heavily so the estimates become correlated, and cost grows linearly. Five or ten folds is the usual compromise.
Stratify when classes are imbalanced so each fold keeps the base rate, and group by entity when several rows belong to the same customer, patient or session to avoid leakage.