正好 (zhènghǎo) can be used as an adjective or adverb to help express a coincidence, and it could be related to size, volume, quantity, degree, time, etc. This is similar to how we say in English “Oh, this shirt I grabbed was just the right size." or something like that.
Using 正好 with a noun
When used with a noun, use 正好 right after it, followed by an adjective.
noun.+正好(as a adjective)
Examples
这 件 衣服 的 号码 正好。
Using 正好 with a verb
With just the verb
When used with a verb, the 正好 goes right before it.
正好+V.(as a adverb)
Examples
我 出 门 的 时候正好 下雨。
With just 得 and a verb
You can also use 正好 along with 得, as shown in the following examples. This is usually a clause of its own.
V.+得+正好(as a adverb)
Examples
你 来 得 正好,不 早 也 不 晚。