Other factors can influence the necessary height of the chimney such as house stack effect and high altitude.
How high chimney above roof.
The chimney must extend at least 3 above the highest point where it passes through a roof.
And at least 2 higher than any portion of a building within 10.
There are strict codes that govern chimney placement for fire safety reasons.
If the pipe is farther than 10 feet from the roof.
Flues that are more than 3 metres away from the highest part of the roof need to be 1000mm above the flue penetration.
The chimney opening above the roof of a sticks and bricks house should be 3 feet above the roof line or 2 feet above any part of the building within 10 whichever is higher.
If the chimney or flue exits the roof within 600mm horizontally of the ridge then the flue or chimney should be a minimum of 600mm above the ridge.
They intend to make sure that the chimney draws properly and that a fire hazard does not occur.
For most small structures like small cabins and tiny homes the tallest part of the structure is within 10 of the chimney.
The top of a chimney pipe must extend at least 2 feet above the peak of the roof if the pipe is within 10 feet of the peak.
Diagram 2 shows the area on a traditionally constructed non flammable material roof where the flue must not terminate.
It means any pipe penetrating a roof must be three feet above the roof line on the up slope side of the penetration.
Flues need to be 600mm higher than the highest part of the roof within 3 metres.
This is a bit of an odd measurement and chimney clearance case because the chimney side is actually about 8 away from the roof edge.
The flue or chimney outlet must be above and outside of the shaded area.
A chimney should be at least two feet above the highest roof point.
If there is a steep roof or nearby obstruction the chimney will need more length above the roof to meet code.
You can leave solid pack chimneys exposed and braced.
Homes built on varying terrain have their own set of chimney and flue regulations.