| 开发者 | calculatorio |
|---|---|
| 更新时间 | 2026年11月11日 01:32 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[ci_percentage_calculator].
What you enter: Value 1, Value 2.
What you get: Percentage.
Features:
[ci_percentage_calculator] shortcode to a page or post.Add the shortcode [ci_percentage_calculator] to a page or post. In the block editor use a Shortcode block. In a theme template use <?php echo do_shortcode( '[ci_percentage_calculator]' ); ?>.
title (1 or 0), theme (light, dark or auto), accent (a hex colour such as #2563eb) and max_width (for example 720px, 80% or 40rem). See the Usage section for examples. Invalid values are ignored and the default is used instead.
Use theme="dark" for always dark, or theme="auto" to follow the visitor's light/dark system setting. The default, theme="light", keeps the calculator light on any background.
Yes. Use title="0" and the heading with the calculator's icon is not printed, so you can write your own.
No. The calculation happens in the visitor's browser, nothing they enter leaves the page, and the plugin makes no requests to calculator.io or any other external service. It sets no cookies and loads no ads or trackers.
The frame adjusts its height automatically while the page is open. If your theme or a caching or optimisation plugin removes scripts from the page, the frame keeps a default height; exclude the plugin's ci-embed.js file from script optimisation.
Multiply the number by the percentage and divide by 100. For example, 20% of 3,000 is (20 ÷ 100) × 3,000 = 600, and the remaining 80% is (80 ÷ 100) × 3,000 = 2,400.
Divide the first number by the total and multiply by 100. For instance, a $3,000 profit on a $12,000 investment is (3,000 ÷ 12,000) × 100% = 25%, meaning it equals a quarter of the total.
Subtract the starting value from the ending value, divide by the starting value, and multiply by 100. Going from $12,000 to $15,000 is (15,000 − 12,000) ÷ 12,000 × 100% = 25%, so the amount grew by 25%.
Subtract the smaller value from the original, divide by the original, and multiply by 100. If profit falls from $3,000 to $2,700, that is (3,000 − 2,700) ÷ 3,000 × 100% = 10%, a 10% decrease.
Yes, the order changes the result. Entering $12,000 then $15,000 gives a 25% increase, while entering $15,000 then $12,000 evaluates a drop and gives a 20% decrease.
title, theme (light, dark, auto), accent and max_width