The sources I checked claim that in an R boxplot the top of the box represents the 3rd quartile. This is not the case.
Example:
x <- c(2, 4, 18, 26, 50, 120)
b <- boxplot(x)
The top is 50, confirmed by b$stats. But Q3 = .15 * 24 / .2 + 26 or directly, quantile(x) gives 44. What does the top of the box represent?
Note: By default, R uses version 7 of the quantile function.