Virtual history, also referred to as "counterfactual history" is a form of history which seeks to explore history and historical processes from the point of view of extrapolating a position in which certain key historical events did not happen or had an outcome which was different to that which did in fact occur. It should be noted that many historians find counterfactual history a controversial topic. It should further be noted that virtual history is most emphatically not revisionist history, nor should it be confused with the genre of alternate history fiction.

Although there are Victorian examples of virtual history, it was not until the 20th century that the exploration of counterfactual positions was to begin in earnest. An early example is "If, or History Rewritten," (1931), which features a contribution by Winston Spencer Churchill who examined what would have happened had Robert E. Lee won at the Battle of Gettysburg.

A more recent collection of essays exploring topics in these fields are to be found in "Virtual History: Alternatives and Counterfactuals" edited by Niall Ferguson.